❮ asort
❯
- ksort
ksort
examples/intro/ksort.php
<?php $a = array('two' => 2, 'one' => 1, 'three' => 3); ksort($a); # sort according to keys while (list($key, $value) = each($a)) { print "$key $value\n"; } ?>
<?php $a = array('two' => 2, 'one' => 1, 'three' => 3); ksort($a); # sort according to keys while (list($key, $value) = each($a)) { print "$key $value\n"; } ?>