Posted by Mladen Gogala on 05/21/06 03:01
On Sat, 20 May 2006 23:46:54 +0100, Paul Lautman wrote:
> function compare($x, $y)
> {
> if ( $x[1] == $y[1] )
> return 0;
> else if ( $x[1] < $y[1] )
> return -1;
> else
> return 1;
> }
Try with this:
function compare($x, $y)
{
GLOBAL $contents;
if ($contents[$x] == $contents[$y])
return(0);
else
return ($contents[$x]<$contents[$y]? -1:1);
}
--
http://www.mgogala.com
[Back to original message]
|