Soru:
Array
(
[1257984000] => 2009-11-11 19:00:00
[1258416000] => 2009-11-16 19:00:00
[1258722000] => 2009-11-20 08:00:00
[1258394400] => 2009-11-16 13:00:00
)
Bu benim dizidir. Ben tür dizi numarasına (yani 1257984000,1258416000 vb) dayalı istiyorum.
Kullanılmış Kodlama:
function cmp($a, $b) {
if ($a == $b) {
return 0;
}
return ($a < $b) ? -1 : 1;
}
uasort($array, 'cmp');
It is not sorting properly. Whether my coding style is correct? Please help me to solve this issue.
Teşekkürler.