How to extract data out of a specific PHP array
- by user77413
I have a multi-dimensional array that looks like this:
The base array is indexed based on category ids from my catalog.
$categories[category_id]
Each base array has two underlying elements:
['parent_category_id']
['sort_order']
I want to create a function that allows us to create a list of categories for a given parent_category_id in the correct sort order. Is this possible? Technically it is the same information, but the array is constructed in a weird way to extract that information.