Skip to content

Tag: arrays

Access data in nested array with PHP

From a web service I am reading an xml file with the following structure I then use the following php code to parse through the data I would expect the code above to display Instead my output is I am real beginner in php and cant really figure this out… Any help please? Answer $productsArray[‘Stor…

Search for an item in inner array

I have an assoc array looking like this (the data comes from user input, this is just an example) How would I look for a specific startingDate for example if I don’t want to loop over every ID. Basically I’m looking for a way to do something like $eventDates[*][“startingDate”] Answer Y…