Or this:
function sortForMe($a, $b)
{
if ((int)$a['news_published'] === (int)$b['news_published']) {
return 0;
}
return (int)$a['news_published'] < (int)$b['news_published'] ? -1 : 1;
}
usort($array, 'sortForMe');
you can use function or static method from class - your choice :)