Quite often, you need to retrieve rows from a mysql table and display it on a PHP page. Every time, the number of columns and rows are different. So you can use this useful php cod
Read tutorial ↗onvert a hex string into a 32-bit IEEE 754 float number. This function is 2 times faster then the below hex to 32bit function. This function only changes datatypes (string to int)
Read tutorial ↗Floating point numbers have limited precision. Although it depends on the system, PHP typically uses the IEEE 754 double precision format, which will give a maximum relative error
Read tutorial ↗Here are some tricks to convert from a "dotted" IP address to a LONG int, and backwards. This is very useful because accessing an IP addy in a database table is very much faster if
Read tutorial ↗This is a very simple but useful function to return number of digits of an integer.
Read tutorial ↗Here is a function that you can use if you have a need to force strict boolean values.Hopefully this will save someone some time from searching for similar.
Read tutorial ↗Function to sort array by elements and count of element (before php 5.3) (not use Lambda Functions, and Closures)
Read tutorial ↗Note this one only checks for string and defaults to the PHP (boolean) cast where e.g. -1 returns true, but you easily add some elseifs for other datatypes.
Read tutorial ↗Like every programming language, PHP offers the usual basic primitive types which can hold only one piece of data at a time (scalar). I am particularly fond of the "object" type (c
Read tutorial ↗Recently many sites have been hacked by this malware. If your site is hacked as well, here's what you can do.
Read tutorial ↗I could not get PHP pages to display in IIS 6 with Windows 2003, using the default install of the stable binaries from php.net.
Read tutorial ↗If you encounter the following error using PHP under IIS: "Warning: session_start(): open .... failed", you need to grant "read/write" permissions to the "IUSR" on the directory li
Read tutorial ↗