Quick actions

cmd+k|ctrl+k

Navigation

Languages

test_ksort

Snippet info

Language

Php

Visibility

public

Author

fenghestudio

Created

2019-09-17T02:25:53Z

Updated

2019-09-17T02:25:53Z

<?php

$fruits = array("d"=>
"lemon", "a"=>
"orange", "b"=>
"banana", "c"=>
"apple");

ksort($fruits);

foreach ($fruits as $key =>
 $val) {
    echo "$key = $val\n";

}
?>
INFO