“PHP Sort Hight to Low” Kode Jawaban

Urutkan array php

<?php
$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
asort($fruits);
foreach ($fruits as $key => $val) {
    echo "$key = $val\n";
}
?>
//Would output:
c = apple
b = banana
d = lemon
a = orange  
GelatinousMustard

PHP Sort Hight to Low

$letters=array("b","a","c");
arsort($letters); //referse sort an array ("c","a","b")
Friendly Hawk

Jawaban yang mirip dengan “PHP Sort Hight to Low”

Pertanyaan yang mirip dengan “PHP Sort Hight to Low”

Lebih banyak jawaban terkait untuk “PHP Sort Hight to Low” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya