You can use uasort, and inside sortByPubdate define the way the two pubdates should be compared.
uasort($story_array, 'sortByPubdate');
// Sort function
function sortByPubdate($a, $b) {
if ($a->pubdate == $b->pubdate) {
return 0;
}
return ($a->pubdate < $b->pubdate) ? -1 : 1;
}
Sergi
2009-11-19 12:03:17