Associate
- Joined
- 2 Sep 2007
- Posts
- 1,975
Hi All
I'm trying to pull a specific element in an XML file and I want to use a variable in the following code: -
echo $episodes->episode[0]->title;
0 pulls the first one. I want to use a variable instead I've tried this
echo $episodes->episode[$index]->title;
But I've had no joy. Any ideas?
I'm trying to pull a specific element in an XML file and I want to use a variable in the following code: -
echo $episodes->episode[0]->title;
0 pulls the first one. I want to use a variable instead I've tried this
echo $episodes->episode[$index]->title;
But I've had no joy. Any ideas?