jarvis
-
Posts
543 -
Joined
-
Last visited
Community Answers
-
jarvis's post in Sort Array by Year Gives Wrong Order was marked as the answer
Sorted it with
usort($productions, function($a1, $a2) { $v1 = strtotime($a1['year']); $v2 = strtotime($a2['year']); return $v2 - $v1; // $v2 - $v1 to reverse direction });
-
jarvis's post in A variable as array value was marked as the answer
Thank you all for you comments
@Barand, I think that was the missing piece I needed. So if I've understood you correctly, I could just do this:
$categories = array(); foreach($wctTerms as $wctTerm) { $categories[] = $wctTerm->slug; } Would that work?
I think I've over complicated something very simple (the usual!)