📜  如何在php代码示例中使用数组和for循环打印后排序

📅  最后修改于: 2022-03-11 14:54:38.656000             🧑  作者: Mango

代码示例1
$cars = array("Volvo", "BMW", "Toyota");
sort($cars);

$clength = count($cars);
for($x = 0; $x < $clength; $x++) {
  echo $cars[$x];
  echo "
"; }