Php Match Snippets


07 December, 2011   

Php code to guessing a number using in html page

27 May, 2015   

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

07 April, 2013   

A simple example code for user login with a login form and database query

04 March, 2012   

The for loop is used when you know in advance how many times the script should run.

16 November, 2014   

Useful php code to see if the current file is being included or run directly.

28 June, 2016   

JavaScript code example for Parse Zapier apps list

Several hundred user notes on the str_replace page later, and we have a function that provides a variety of text highlighting options for plaintext or HTML strings.

14 August, 2012   

PHP code to validate email

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

To create the formatter paste this code into a new file and name it sfWidgetFormSchemaFormatterDefList.class.php. I saved it in /lib but it also makes sense to put it in /lib/form, depending on your personal preference.

14 May, 2011   

This is a general code to use when deleting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. A variation of the code would be not to delete the record (as you tend to always need to restore or retrieve it sooner or later) you can add a 'status' field. If status='d' then it is...

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

02 June, 2011   

This will check an email, to see if it is in a valid format.

13 April, 2011   

Connecting to a MySQL database to make the data from the database available in your Web application, can be done in many different ways. Here are two often used methods.

23 May, 2018   

Add to bookmarks bar, select text, click it to get the word count.

26 December, 2012   

This cron will do the same on Windows as session management works on Linux

27 April, 2013   

PHP code for Fast Triangular Numbers

30 August, 2011   

This snippet to show how to use the Last-Modified and the ETag header to optimize the caching of a website. If used correctly this will speed up your page loads.

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

01 April, 2015   

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