Useful PHP Snippets

If you are looking for useful PHP snippets, here's list compiled from my previous posts. I am sure this list will come in handy for you in your PHP projects.
PHP $_GET & $_POST VariablesPHP MySqli Basic usage (select, insert & update)Send PHP mail with AttachmentCheck CURL is enabled in PHPGenerate Random String Using PHPDetect Ajax Request using PHPAdd Comments in PHPWorking with PHP SessionsSet Cookies Get Cookies Delete Cookies with PHPCreating PDF Files using PHP FPDF libraryHandle JSON data using PHPUpload a file with PHPResize Multiple Images in a Folder using PHPOutput Text on Image using PHPCache Dynamic Pages with PHPDate formats in PHPPHP Explode and ImplodeRedirect user to new URL with PHPRandomized quote display PHPPHP Pagination FunctionMicrosoft Access using PHP PDOReturn Currency Symbols using PHPForce download any file using PHPMake Plain text URLs clickable linksShorten URLs using Bit.ly API (PHP)Get domain name from email using PHPBlock Disposable email domains (PHP)Create New Widget in WordPressUseful PHP functions Copy/PasteBasic Adsense Plugin for WordPressOutput Text on Image using PHP imagettfbboxAmazon SNS Subscription verification with PHPGrab Picture From Remote URLUsing WordPress Custom FieldsFixing Image Orientation using its Exif dataCreating Valid RSS feed Using PHP DOMCreating RSS feed Using PHP SimpleXMLGet Percentage using PHPCreate Image Gallery from a DirectoryImage Upload and Re-size with PHPWatermark an uploaded Image with PHPCapture Array Values from Dynamic input Fields Combine JS or CSS files with PHPPHP $_GET & $_POST Variables10 Exceptionally Reliable PHP Snippets for DevelopersBackup MySQL Database Using PHP MySqliBackup Website and Database using PHP exec()Generate Username from User First and Last Name
  • PHP snippets are often needed for developers to complete all types of projects. Thanks for writing great articles on several useful PHP snippets for us.
  • Hello Saran Chamling, This is a wonderful php tutorial collection. Thanks a lot. I need a simple php function which help me to display user online Ex. Online User: 100 User: 20 Guest: 80 I want to add this information in my website http://1stwebsuite.com Sidebar.