Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
Results 1 to 1 of 1
Thread: Loop
-
04-11-2016, 07:15 PM #1New to the CF scene
- Join Date
- Apr 2016
- Posts
- 1
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Loop
$temp_categories contains
SimpleXMLElement Object
(
[category] => Array
(
[0] => London Theatre
[1] => Musicals
[2] => Olivier Awards
)
)
How do I loop through it in php to get the category values as this isn't working
$item_categories is exactly the same as $temp_categories
Code:$temp_categories = $Output_categories->categories; print_r($temp_categories); foreach($temp_categories as $item_categories){ print_r($item_categories); echo $item_categories->category; echo $item_categories; }
Thanks



Reply With Quote
