How to sort array in php


$cars=array(“Jems”,”Vijay”,”Alpesh”,”Yogi”);
sort($cars);

$clength=count($cars);
for($x=0;$x<$clength;$x++)
{
echo $cars[$x];
echo “<br>”;
}

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *