function my_sort($a,$b)
{
if ($a==$b) return 0;
return ($a<$b)?-1:1;
}
$a=array("A","C","B");
usort($a,"my_sort");
$arrlength=count($a);
for($x=0;$x<$arrlength;$x++)
{
echo $a[$x];
echo "<br>";
}
?>
{
if ($a==$b) return 0;
return ($a<$b)?-1:1;
}
$a=array("A","C","B");
usort($a,"my_sort");
$arrlength=count($a);
for($x=0;$x<$arrlength;$x++)
{
echo $a[$x];
echo "<br>";
}
?>
Comments
Post a Comment