Php Programming Code Examples Php > Code Snippets Page redirect PHP and cURL example Php and java example Shows the value of PI Populate a select menu from a MySQL database Display users processor information This example will display a different background color for each day of the week Spam bots love looking for email addresses, give them a helping hand This example uses an array to store images and then produces a random Generate random letters This shows how to generate random numbers Random password generator Generates a random string from an array of characters Random title Reading RSS feeds with PEAR xml_rss package Remove all characters except letters and numbers from a string Remove whitespace from a text string using the PHP trim function Another resizing an image example Function sorts an array in the reverse order Find a pattern in a text file This example shows how to search and replace on a string Send email using the PHP mail() function Displays lots of server information Shorten a text string This displays all tables in a MySQL database, enter your own database This is a simple email form example This is a simpler version of our metatag generator and only generates Simple quote of the month Size of a webpage with PHP and cURL Display latest news from Slashdot Split a file into path info Splitting a string Status code of a web pagewith PHP and cURL Lookup the symbol for a company System uptime using php_w32api.dll functions Display the latest news from the register on your site This backups index.php to a gzip file This example shows some simple browser detection This is a currency convertor which allows a user to get the latest currency This is the next step in the directory file viewer , allowing your users to A greeting based upon the time of day Time to load page example A clock that updates Use ereg to check that characters in a variable only contain letters Same as before but the user chooses the quotes they wish to see This shows how to use the trim function to remove white spaces This example checks whether a link is valid or not Validate an email address using regular expressions Verify using ereg that characters in a variable only contain numbers Visitor information Displays the type of image A while loop example in PHP Word wrap Write data to a text file Latest news from Yahoo news Page 1 Page 2 Page 3