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)); }
wkhtmltopdf has a bug as a result of a webkit bug. This means that the nice css styles for table printing don’t work in wkhtmltopdf. Fortunately for us, wkhtmltopdf can…
I have a particular Linux set up I need to test something on, but I use a Mac, so I use VirtualBox with a Linux VM for the testing. So,…
I found that a script I was running was calling some linux functions using exec() but they weren’t always successful and I couldn’t tell why. exec('command to run'); This would…
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…
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…