Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array order alphabetically

// SORT ARRAY ALPHABETICALLY
$frutas = array("limón", "naranja", "banana", "albaricoque");
sort($frutas);
foreach ($frutas as $clave => $valor) {
    echo "frutas[" . $clave . "] = " . $valor . "
";
}
 
PREVIOUS NEXT
Tagged: #php #array #order #alphabetically
ADD COMMENT
Topic
Name
6+2 =