Return multiple values from a function in PHP
A function can only return one value, but that value can be an array or other compound value. If you want to just define several variables into the global scope within your functio
Read tutorialTHE TUTORIAL LIBRARY
A function can only return one value, but that value can be an array or other compound value. If you want to just define several variables into the global scope within your functio
Read tutorialIf you compiled with "--enable-track-vars" then an easy way to get variable function args is to use extract()
Read tutorialYou may pass any number of extra parameters to a function, regardless of the prototyping. In addition, the arguments passed to a function will be available via the variable names d
Read tutorialTo use a PHP class within a function, you need first to load class OUT of the function and then you can use the class functions from your function.
Read tutorialIf you define function within another function, it can be accessed directly, but after calling parent function.
Read tutorialAnother useful function to find the first and last day of the month from the given date in PHP
Read tutorialHere is an useful code snippet that calculates the next working day in the US. This takes into account the US Federal holiday as well.
Read tutorialI found this little function very useful in fixing strings that are not in utf-8 but need be converted
Read tutorialI think this is a reasonable port of Perl's Encoding::FixLatin by Grant McLean, which converts a string with mixed encodings (ASCII, ISO-8859-1, CP1252, and UTF-8) to UTF-8.
Read tutorialI've been working on a is_utf8 function and wanted to post it here, in addition to others i also took in consideration the 5000 char bug:
Read tutorialQuite 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 tutorialonvert 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 tutorialOne example today. A better developer tomorrow.