📜  php 数组按字母顺序排列 - PHP 代码示例

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

代码示例1
// SORT ARRAY ALPHABETICALLY
$frutas = array("limón", "naranja", "banana", "albaricoque");
sort($frutas);
foreach ($frutas as $clave => $valor) {
    echo "frutas[" . $clave . "] = " . $valor . "\n";
}