PHP supports both scalar arrays and associative arrays. In fact, there is no difference between the two. You can create an array using the list() or array() functions, or you can explicitly set the value of each array element.
$a[0] = "abc";
$a[1] = "def";
$b["foo"] = 13;
You can also add to the array Numeric values to create an array.
$a[] = "hello"; // $a[2] == "hello"
$a[] = "world"; // $a[3] == "world"
Arrays can be sorted through the functions asort(), arsort(), ksort(), rsort(), sort(), uasort(), usort(), and ksort(). Which function to use depends on your needs. It depends on the type of sorting you want.
You can use the cunt() function to count the number of elements in an array.
You can use the next() and prev() functions to traverse the array. Another common way to iterate over an array is to use the function each().