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

What attribute makes an option from <select> selected?
checked="checked" selected="selected" disabled="disabled"
<select name="a_name">
 <option value="val1">Option 1</option>
 <option value="val2" selected="selected">Option 2</option>
What CSS value allows to create color gradients for background?
contain repeat-x linear-gradient
#id {
  background: linear-gradient(top left, #1f1, #fff, #11f);
What statement creates an array in JavaScript?
[] {} new Object()
var arr = [1, "", ""];
Indicate the PHP function used to redirect to other page.
function() header() switch()
PHP Code Snippets

Last accessed pages

  1. JavaScript Course - Free lessons (6651)
  2. Working with getElementById (6001)
  3. Shape Tween - Flash Animation (1827)
  4. Get data from string with JSON object (837)
  5. jQuery parent, children and nth-child() (5502)

Top accessed pages

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