$s =S
$d = D
usort ( $data, function ($a,$b )use ($s) {
if ($a[$s]>$b[$s] ) {
return 1 ;
} else
{
return 0 ;
}});

if ($d == 'DESC'){
rsort($data);
}

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

   
© 2012 Программирование в удовольствие Яндекс.Метрика Suffusion theme by Sayontan Sinha