While I was working on a project my colleague provided me a list of foreign characters which…
PHP
7 Articles
7
php how-to
To remove extra spaces from a string $string = preg_replace(‘/\s+/’, ‘ ‘, $stringWithSpaces);
If we wanted to remove some words from any string, this snippet would be helpful: <?php…
We can utilise the second argument of strtotime to specify the date to calculate “last Friday” and other relative…
The following might be useful for anyone who needs it. From PHP Version > 5 below new…
Very little handy code to remove duplicate elements from php associative array. If you do have an…
Check if its thursday after 3PM, saturday or sunday or monday before 9AM. if((date(‘N’) == 4 &&…