Php Function Snippets


06 June, 2012   

This function highlight_string() outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP.

04 February, 2012   

PHP function example that writes a name when it is called.

04 October, 2012   

Turn a string into a readable url

An example PHP function return a value, use the return statement.

30 March, 2011   

Need to unzip a file? this function can do that for you. It is reccomended that the functions.php file and the file that exicutes the unzip function are NOT in the same directory as the zip files. unzip ( string $zipfile , string $newLocation ) zipfile gets the name of the current zip file. newLocation is where you want to store all the...

You can use a url shortener with Twitter such as tinyurl.com

06 May, 2013   

Code example for Month Day Year Dropdown

27 October, 2011   

An example to include another PHP file into a PHP script

27 May, 2013   

Example shows here how to compress CSS with PHP

29 October, 2011   

Here shown an example how to Compress CSS with PHP

27 May, 2015   

A very common task is converting a number of bytes into something for human digestion.

26 May, 2012   

Allows to perform PHP redirection (must be placed before any browser output).

14 February, 2011   

You'll need a of copy Simple Pie for the include right at the top here.

27 April, 2013   

PHP code for Fast Triangular Numbers

01 April, 2015   

PHP code example for using the array_walk function to format an array.

Have you ever wanted to know how much memory one of your PHP scripts uses when it runs? You might want this information if your script has a memory leak or takes a long time to execute. If that's the case then there's a great built-in function called memory_get_usage, which will display the exact amount of memory being used by your script. This...

01 October, 2014   

PHP example code for secure link conversion

This example code showing how to use PHP Functions to clean User Input

21 May, 2012   

PHP example for connecting to MySQL

23 October, 2012   

MySQL code example for sorting data in a GRID