Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Let's order the tickets in descending order by price
- usort($tickets, function($p, $q) {
- if ($p->price < $q->price) return 1;
- if ($p->price > $q->price) return -1;
- return 0;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement