sort() function is sorts an array by the values.
Syntax :
sort(array)
array = Specifies the array to sort
array = Specifies the array to sort
Example:
<?php
$array = array("easy","way","to","learning", "php", "code");
sort($array);
print_r($array);
?>
$array = array("easy","way","to","learning", "php", "code");
sort($array);
print_r($array);
?>
Output:
Array ( [0] => code [1] => easy [2] => learning [3] => php [4] => to [5] => way )


0 komentar:
Post a Comment