asort() function sorts an array by the values.The values keep their original keys.
syntax
asort(array,sorttype)
Output
Array([0]=>apple
[1]=>orange
[2]=>pine apple)
syntax
asort(array,sorttype)
<?php $sum=array(0=>"apple",1=>"orange",2=>"pine apple"); asort($sum); print_r($sum); ?> |
Array([0]=>apple
[1]=>orange
[2]=>pine apple)
0 comments:
Post a Comment