IT360 Applied Database Systems

Working with Arrays

Element at index 0 is thing1
Element at index 1 is thing2
Element at index 2 is thing3

The values in $prices array are

Element with key Tires has value 100
Element with key Oil has value 10
Element with key Spark plugs has value 200

Sorted array

Element at index 0 is thing1
Element at index 1 is thing2
Element at index 2 is thing3

The values in $prices array sorted by key are

Element with key Oil has value 10
Element with key Spark plugs has value 200
Element with key Tires has value 100

The values in $prices array sorted by value are

Element with key Oil has value 10
Element with key Tires has value 100
Element with key Spark plugs has value 200