Home >> Snippet List

PHP Code Snippets

<<first    <prev    1  2  3  4  5  6  7  (8) 9       next>     last>>
  • Send Unicode Response From PHP - Send back text in Unicode from PHP...
  • Server Stats via PHP - Get server stats on a web page in a nice display format...
  • Set/Get/Remove Cookies - Examples of setting, getting, and removing cookies...
  • Show current time as PNG-image - Code to display the current time as a PNG image...
  • Show mySQL table as HTML - This example use mySQL functions from PHP to display a full mySQL table (eve...
  • Show the current season (spring, summer, fall, winter) - Returns the current season (spring, summer, fa...
  • Simple Averaging - A clearly written function that will get the average of numbers that were passed in...
  • Simple DB connection class - A simple DB connection class with all often used mySQL functions...
  • Simple downloader script - A simple downloader script...
  • Simple image scaling - Simple way of scaling any image to fit either given width or height If you ar...
  • Simple one-line template engine - Very slick, very fast one-line template engine Faster than Smarty Ite...
  • Simple reversible encryption - This is an example of encryption and decryption that uses the Mcrypt lib...
  • Sine, Cosine, and Tangent - Easy way to get the Sine, Cosine, and Tangent...
  • Create Basic PDF - Very basic example of creating a PDF file...
  • Split all chars in string - Split out all of the characters in a string...
  • Split URL into parts #1 - Decomposes a URL completely...
  • Storing images in a database - This tutorial teaches you how to upload images into a mysql database usi...
  • String to Date - Convert almost any English textual representation of a date into a timestamp...
  • Strip HTML to Text - Strips tags, tables, etc and returns nice, clean text from HTML source...
  • Super-mini Chat room - A super small, super simple chat room No security, so use at your own risk...
  • Super Simple Database Driven Web Site - Make a MySQL Database called "db" with a table named "variables...
  • Super simple encryption example - Super simple encryption example The output is the sum of 6 and the AS...
  • Ternary Operator - Included for the sake of reference Few PHP programmers use the ternary operator ...
  • Test If File Is Included - This tests to see if the current file is being included or run directly It's...
  • Test if mySQL table exists - This script just tests to see if a given table exists in mySQL database...
  • Text to GIF - Slick method of changing text to an image- useful to prevent copying text easily...
  • PHP to JavaScript Array - Given a PHP array (even a deep nested array), this function returns a string ...
  • Toggle a column bit regardless of state - Toggle a column bit regardless of state Useful to change stat...
  • Truncate Links Over X Chars long - Truncate URL if longer than 'X' characters (add http:// or ftp:// if...
  • Truncate text while preserving HTML tags - Truncate or limit a text string while still preserving any H...
  • <<first    <prev    1  2  3  4  5  6  7  (8) 9       next>     last>>