Php Functions Snippets


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...

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

04 May, 2011   

Need to people out if they have been inactive for too long? Do it with this piece of code. Introduction ----------------------- This takes 3 functions to complete the inactive session task. 1. We need to check if the person is actually logged in using our isLogged function 2. We need the function to check the time the page loaded, and when...

Code example using PHP to add/ remove nodes from an XML file

11 June, 2012   

You may retrieve all needed file path data using PHP's built-in function pathinfo. You don't need to create your own functions or use regular expressions to get this info. It was already been created for this purpose.

30 March, 2011   

Need to people out if they have been inactive for too long? Do it with this piece of code. This takes 3 functions to complete the inactive session task. 1. We need to check if the person is actually logged in using our isLogged function 2. We need the function to check the time the page loaded, and when the last page was loaded 3. We need a...

Javascript append function "DOM Append Text and Element Functions"

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.

18 June, 2013   

Define few variables with your MySQL database connection settings and connect to MySQL database using mysql_connect() and mysql_select_db() functions.

06 May, 2013   

Code example for Month Day Year Dropdown

27 October, 2011   

An example to include another PHP file into a PHP script

29 October, 2011   

Here shown an example how to Compress CSS with PHP

27 May, 2013   

Example shows here how to compress CSS with PHP

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.

In Delphi, procedural types (method pointers) allow you to treat procedures and functions as values that can be assigned to variables or passed to other procedures and functions. Here's how to call a function (or procedure) as a parameter of another function (or procedure) : Declare the function (or procedure) that will be used as a...

PL/SQL functions returns a scalar value and PL/SQL procedures return nothing. Both can take zero or more number of parameters as input or output. The special feature about PL/SQL is that a procedure/function argument can be of input (indicating the argument is read-only), output (indicating the argument is write-only) or both (both readable and...

04 October, 2012   

Turn a string into a readable url

21 May, 2012   

PHP example for connecting to MySQL

23 October, 2012   

MySQL code example for sorting data in a GRID