Some PHP functions and code snippets useful for PHP Programmers and scripts.
New PHP Code Snippets might be added soon.

  1. Output or Force Download MP3 with PHP
  2. Counter Page Visits
  3. Zodiac Signs PHP code
  4. Calculate the Age in PHP
  5. Get the difference between two Dates - Time and Date
  6. Read ZIP archive data with PHP
  7. Extract / Unzip ZIP archive files with PHP
  8. Create ZIP file archive with PHP
  9. Get Lower, Higher, and Closest Number
  10. Get Closest Number
  11. Get all the unique numbers from two-dimensional array
  12. PHP Image with text on New Lines
  13. Get visitor IP in PHP
  14. Save image on server from external URL
  15. Split an alphanumeric string into Array in PHP
  16. XML sitemap with data from MySQL
  17. Recursive function to create Multi-Level Menu in PHP
  18. Chaining Static and Public Methods in PHP
  19. Dynamically PHP Maps with Rectangle, Parallelogram, and Rhomb Shapes
  20. Merge Multiple Files, Line by Line
  21. Sort an entire multi-dimensional Array
  22. Image in PHP with background in two colors
  23. Create Array of Unique Random Numbers or Letters
  24. Get the Timestamp of First and Last day of Month
  25. Convert XML to JSON in PHP
  26. Keep the first Nr IMG tags, Strip all the others
  27. innerHTML in PHP
  28. Force Download files with PHP
  29. Delete multiple consecutive characters and Split long words
  30. Interpret / Parse / Replace variable in string with value
  31. Get Time Elapsed

Daily Test with Code Example

Which tag adds an image in web page?
<div> <img> <span>
<img src="" width="191" height="63" alt="Courses-Web" />
Which of these CSS codes displays the text oblique?
font-style: italic; text-decoration: underline; font-weight: 500;
#id {
  font-style: italic;
Click on the jQuery function used to hide with animation a HTML element.
click() hide() show()
$(document).ready(function() {
  $(".a_class").click(function(){ $(this).hide("slow"); });
Click on the correctly defined function in PHP.
fname function() {} function fname() {} function $fname() {};
function fname($a, $b) {
  echo $a * $b;
PHP Code Snippets

Last accessed pages

  1. Buttons, Checkbox, Radio, Select, Option objects (520)
  2. Insert, Select and Update NULL value in MySQL (2643)
  3. Get the value of the selected /checked checkboxes in a form (6141)
  4. Pinboliada Zuma (98)
  5. Zuma Games (264)

Top accessed pages

  1. PHP-MySQL free course, online tutorials PHP MySQL code (11177)
  2. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (10818)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (10458)
  4. PHP Chat Script (9577)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (9272)