Header menu

_________________________________________________________________________________

Friday, 23 August 2013

How to sort an array in php ?


<html>
<head>
<title>
Sorting an array in php
</title>
</head>
<body>
<?php
$arr=array("Rahul","George","tina","Angel");
echo "Array before sorting"."</br>";
echo "<pre>";
print_r($arr);
echo "</pre>";
sort($arr);
echo "Array After sorting"."</br>";
echo "<pre>";
print_r($arr);
echo "</pre>";
?>
</body>
</html>