Chapter
Sorting
From ComputerScienceOne by Dr Chris Bourke
Concepts
- How does PHP search arrays?
"PHP provides a linear search function, array_search() that can be used to search for an element in an array. The array can be specified to use loose comparisons (default) or strict comparisons. It re
- How can PHP arrays be sorted with sort() and usort()?
"PHP’s sort() function can be used to sort elements in ascending order. This is useful if you have arrays of numbers or strings, but doesn’t work very well if you have an array of mixed types or objec