View Single Post
Old 02-23-2011, 08:34 AM  
CS-Jay
Confirmed User
 
CS-Jay's Avatar
 
Join Date: Oct 2003
Location: Command Central, West Palm Beach, Fl
Posts: 1,794
PHP and xml help!

I'm a bit stuck and hope someone can lend a hand. I cannot get the value of, Choice, using simplexml.

Here's the xml:

PHP Code:
<Choice ID="1000">
<
Select NAME="BOB/>
Monday
</Choice>
<Choice ID="
1001">
<Select NAME="
Mary/>
Tuesday
</Choice
I am looping through, trying to get the value of Choice, but I get the array of Select. I would like just get the days.

PHP Code:
$arr = array();
foreach (
$Choice AS $choice){
$arr[] = $choice;
}
print_r($arr); 
Any ideas?
__________________
I do stuff - aIm CS_Jay_D

Last edited by CS-Jay; 02-23-2011 at 08:36 AM..
CS-Jay is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote