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

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

Daily Test with Code Example

Which attribute specifies the HTTP method (GET, POST) used to submit the form-data?
action method value
<form action="script.php" method="post"> ... </form>
Which CSS property allows to add shadow to boxes?
background-image box-shadow border-radius
#id {
  background-color: #bbfeda;
  box-shadow: 11px 11px 5px #7878da;
Which function removes the first element from an array?
pop() push() shift()
var fruits = ["apple", "apricot", "banana"];
alert(fruits.length);           // 2
Indicate the function that can be used to check if a PHP extension is instaled.
function() filetype() extension_loaded()
if(extension_loaded("PDO") === true) echo "PDO is available."
PHP Code Snippets

Last accessed pages

  1. jQuery Ajax - load() method (6982)
  2. Add and Remove HTML elements and Content with jQuery (16504)
  3. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (25899)
  4. HTML Course - Free Lessons (7318)
  5. Convert XML to JSON in JavaScript (10556)

Top accessed pages

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