• hi,
    I’m trying to alter the following code in such a way that post titles show in date order rather than alphabetical order as they do now:

    usort($titles, function($a, $b) {
    			$a = substr(strrchr($a, ' '), 1);
    			$b = substr(strrchr($b, ' '), 1);
    			return strcmp($a, $b);
    		});

    I’m rather new to php and have been stumped by this so far! I’m guessing there is a straightforward way to do it, does anybody knows..?

  • The topic ‘trying to edit alphabetical usort function’ is closed to new replies.