Answers for "php loop sort value"

PHP
0

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

$cars = array("Volvo", "BMW", "Toyota");
sort($cars);

$clength = count($cars);
for($x = 0; $x < $clength; $x++) {
  echo $cars[$x];
  echo "<br>";
}
Posted by: Guest on December-21-2020

Browse Popular Code Answers by Language