<?php $cars=array("Volvo","BMW","Toyota"); sort($cars); print_r($cars); ?>
<?php $numbers=array(4,6,2,22,11); sort($numbers); print_r($numbers); ?>
<?php $cars=array("Volvo","BMW","Toyota"); rsort($cars); print_r($cars); ?>
<?php $numbers=array(4,6,2,22,11); rsort($numbers); print_r($numbers); ?>
<?php $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43"); asort($age); print_r($age); ?>
<?php $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43"); ksort($age); print_r($age); ?>
<?php $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43"); arsort($age); print_r($age); ?>
<?php $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43"); krsort($age); print_r($age); ?>