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

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

Daily Test with Code Example

Which tag create a highlighted bolded text?
<q> <strong> <em>
<p>Address: <strong></strong> - Tutorials.</p>
Which of these CSS codes displays the text bolded?
text-size: 18px; font-style: italic; font-weight: 800;
#id {
  font-weight: 800;
What JavaScript function can be used to call another function multiple times, to a specified time interval?
setInterval() setTimeout() push()
function someFunction() { alert(""); }
setInterval("someFunction()", 2000);
Click on the correctly defined variable in PHP.
var vname = 8; $vname = 8; $vname == 8;
$vname = 8;
echo $vname;
PHP Code Snippets

Last accessed pages

  1. Mahjong1 (1287)
  2. Working with getElementById (8865)
  3. Butterfly Kyodai (6702)
  4. Strategy Games (3242)
  5. Sonic Xtreme 2 (143)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (47785)
  2. Read Excel file data in PHP - PhpExcelReader (35921)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (35547)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (32047)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (29322)