I have an array in my PHP controller like this:
$expired_brands = array();
And items inside the array like this:
array_push($expired_brands,$brand);
Where $brand contains a date like this:
$brand['endDate'];
My question here is, is there any way for me to sort this array without using query... Is there some function in PHP that can sort the elements based on their values inside the array?
So to note: I'd like to sort the elements inside the array by its endDate like this:
$brand['endDate'];
Can someone help me out with this?