Case insensitive PHP in_array()
Simple function for using in_array() with case insensitive querying. function i_in_array($needle, $haystack) { return in_array(strtolower($needle), array_map("strtolower", $haystack)); }
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
Simple function for using in_array() with case insensitive querying. function i_in_array($needle, $haystack) { return in_array(strtolower($needle), array_map("strtolower", $haystack)); }
If you ever find that you are creating a folder with PHP, and its immediately not writeable by Apache, then you’ve probably done what I did with the chmod. It…
I recently wanted to add a Zend library to a project without adding the entire framework. I found that internally, the Zend application requires the Library path to be in…
IMAP To get imap support in PHP on your Mac, you need to get the php_imap module compiled for your version of PHP. I have attached mine to this to…
You cannot strip a certain list of tags with PHP’s strip_tags() function, you can only strip ‘all but’ tags. So in order to do so, you’ll need to use regular…
imap_open() : Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX This error /can/ be missleading. I thought something was up with the stream (guessing there was a misconfiguration with PHP, IMAP and openSSL) –…
So you’ve made changes to your Apache config, but there are hundreds of uses currently online. To reload the config changes without restarting the service or server, you can run…
If you are switching on the AllowEncodedSlashes setting in the apache conf file, and it doesn’t seem to be making any difference, then it may well be because you are…
You can use the PHP function error_reporting() at run time to set the level of error reporting in your application. The different levels of reporting are based on bit masks…
I recently needed to update a page that dumped a HTML table into Excel – and found it dumped everything, including hyperlinks, buttons, images, etc. This didn’t sit well with…