I have a need to save some html snippets to an array. These snippets would have something like a position attribute, which I would pass as well. I want PHP to output all of my snippets in descending order.
I know how to do it in JS/jQuery, by setting my position in a data attribute and then sorting, but I'm unsure how to proceed in PHP.
Any clue to point me in the right direction?