how to sort with array and after print by for loop in php

Solutions on MaxInterview for how to sort with array and after print by for loop in php by the best coders in the world

showing results for - "how to sort with array and after print by for loop in php"
Julia
22 Sep 2016
1$cars = array("Volvo", "BMW", "Toyota");
2sort($cars);
3
4$clength = count($cars);
5for($x = 0; $x < $clength; $x++) {
6  echo $cars[$x];
7  echo "<br>";
8}