This is kinda dumb question but after all these tries i get confused when i go too far...
I want a data like: Name
Price
Owner
in different arrays as categories.
Like ie. i would like to access it via $product['category']['name']['name']
or $product['category']['name']['price']
.
However i would need to check in which categories there is key ['name']
as well.
Any examples would be nice to learn from ;)
You can loop array:
foreach($product['category'] as $cat) {
if (isset($cat['name']) { //this is true if 'name' have value different than null
continue; //cat have name
}
}