Home >> FAQs/Tutorials >> PHP Script Tutorials and Tips >> Index

PHP Tutorials - PHP Built-in Functions for Arrays

By: FYICenter.com

A collection of 19 tips on PHP functions on arrays. Clear answers are provided with tutorial exercises on searching keys and values, sorting arrays, merging two arrays, looping on array elements, expanding and truncating arrays. Topics included in this collection are:

  1. How To Get the Total Number of Values in an Array?
  2. How Do You Know If a Key Is Defined in an Array?
  3. How To Find a Specific Value in an Array?
  4. How To Get All the Keys Out of an Array?
  5. How To Get All the Values Out of an Array?
  6. How To Sort an Array by Keys?
  7. How To Sort an Array by Values?
  8. How To Join a List of Keys with a List of Values into an Array?
  9. How To Merge Values of Two Arrays into a Single Array?
  10. How To Use an Array as a Queue?
  11. How To Use an Array as a Stack?
  12. How To Randomly Retrieve a Value from an Array?
  13. How To Loop through an Array without Using "foreach"?
  14. How To Create an Array with a Sequence of Integers or Characters?
  15. How To Pad an Array with the Same Value Multiple Times?
  16. How To Truncate an Array?
  17. How To Join Multiple Strings Stored in an Array into a Single String?
  18. How To Split a String into an Array of Substring?
  19. How To Get the Minimum or Maximum Value of an Array?

(Continued on next topic...)

Selected Developer Jobs: