I'm converting XML file into associative array to pull out the data, the problem is that I have to make 10 loops depends on arrays number in order to get the data.
is there a better way to get a specific column data without creating many loops? because I want to assign them to variables.
the array I'm trying to get data from
Array
(
[catalog] => Array
(
[comp] => Array
(
[0] => Array
(
[look] => Array
(
[shp] => Array
(
[wok] => Array
(
[group] => Array
(
[customer] => Array
(
[author] => jack
[title] => Midnight Rain1
[genre] => Fantasy
[price] => 5.95
[publish_date] => 2000-12-16
[description] => A former architect battles corporate zombies.
)
[customer2] => Array
(
[author] => lemass
[title] => Midnight Rain1
[genre] => Fantasy
[price] => 5.95
[publish_date] => 2000-12-16
[description] => A former architect battles corporate zombies.
)
)
)
)
)
)
[1] => Array
(
[look] => Array
(
[shp] => Array
(
[wok] => Array
(
[group] => Array
(
[customer] => Array
(
[author] => jon
[title] => Midnight Rain1
[genre] => Fantasy
[price] => 5.95
[publish_date] => 2000-12-16
[description] => A former architect battles corporate zombies.
)
[customer2] => Array
(
[author] => kirito
[title] => Midnight Rain1
[genre] => Fantasy
[price] => 5.95
[publish_date] => 2000-12-16
[description] => A former architect battles corporate zombies.
)
)
)
)
)
)
)
)
)
I'm trying to get the data like this!
I have 2 arrays "customer" and "customer1"
I want to get the data like this
customer=>author
the output
jack
jon
because they are in the customer array
its it possible to do that ??