Sorting Array in php

Using sort() The following code showing the sort() function results in the array being sorted into ascending alphabetical order $products = array(‘Tires’, ‘Oil’, ‘Spark Plugs’);sort($products); The array elements will now appear in the order Oil, Spark Plugs, Tires $prices = array(100, 10, 4);sort($prices); The prices will now appear in the order 4, 10, 100 Using … Read more