CoderZone.org

 Category: PHP Code

Bookmark and Share

Nicely Format File Size - Nicely format the size of a given file properly.
One-liner to swap variables - A nice one-liner in PHP which lets you swap two variable values.
Online PHP Tester - Online PHP Tester- this lets you test arbitrary PHP code from a browser.
Oracle with PHP - This example demonstrates how data can be SELECTed and manipulated via INSERT, UPDATE and DEL...
Ordinalize (Suffix) Numbers - Add suffix to number (1st, 2nd, 3rd, 4th...)
Output as Word Doc format - Pull data from a DB and output it in MS Word (.DOC) format.
Output mySQL data in columns - A simple PHP script that outputs data into formatted columns. This script tak...
Page creation time - Tells you how many seconds it took to load the page.
Page creation time #2 - Just paste it into the header of the PHP file you wish to show it on, and it will disp...
Pagination Example #1 - A simple pagination example that can easily be modified or enhanced.
Pagination Example #2 - A well thought out pagination function. Easy to modify and/or expand.
Parse RSS into array - Parses RSS into an array. Quick, simple, and nasty but it does the job.
Parsing PHP in Javascript Files - A handy trick showing how to parse and run PHP inside of an external javascri...
Pass vars to/from Javascript - Examples of how to pass vars from PHP to and from Javascript.
PayPal Instant Payment Notification (IPN) - Instant Payment Notification (IPN) is PayPal Payment gateways messa...
Perfect Highlighting Function - This one works very well. :)
Permutation Generator - This Permutation Generator will produce all of the possible combinations of the items g...
PHP Cron Parser Class - A PHP Cron Parser class that allows you to retrieve the previous and next time a cron j...
PHP to JavaScript Array - Given a PHP array (even a deep nested array), this function returns a string represen...
Pick Randomly from Array - Randomly pick out one of the array elements and turn it into a string variable. N...
Pre-populated List of Countries - A handy array pre-populated with the world's countries.
Print X Column Tables with PHP - An example of how to print tables with any number of columns using PHP. This e...
Prompt user at command line - From the command line mode, prompt a user for keyboard input.
Pronouncable password generator - Password generation function for PHP. It allows the developer to customize th...
Protect Writable Directory - Use this in writeable directories in .htaccess. This prevents execution of php fil...
Quadratic Equation Solver - A PHP function that uses the syntax such as quadratic(3, 4, 5, 'both') to return bo...
Quick calendar example - Very easy calendar generating code.
Quickly Optimize Database Tables (mySQL) - A fast and useful useful script that quickly optimizes all of the ta...
Quickly sort associative arrays - A "quick sort" function for associative arrays.
Random banner picker - Automatic banner rotation. Randomly selects a banner for display.

© coderzone.org | users online: 9