Wednesday, May 24, 2006

PHP Script Tips - PHP Built-in Functions for Arrays

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.

How To Get the Total Number of Values in an Array?
How Do You If a Key Is Defined in an Array?
How To Find a Specific Value in an Array?
How To Get All the Keys Out of an Array?
How To Get All the Values Out of an Array?
How To Sort an Array by Keys?
How To Sort an Array by Values?
How To Join a List of Keys with a List of Values into an Array?
How To Merge Values of Two Arrays into a Single Array?
How To Use an Array as a Queue?
How To Use an Array as a Stack?
How To Randomly Retrieve a Value from an Array?
How To Loop through an Array without Using "foreach"?
How To Create an Array with a Sequence of Integers or Characters?
How To Pad an Array with the Same Value Multiple Times?
How To Truncate an Array?
How To Join Multiple Strings Stored in an Array into a Single String?
How To Split a String into an Array of Substring?
How To Get the Minimum or Maximum Value of an Array?


----->Answers

No comments: