I've started parsing XML with PHP and got stuck with this problem. I've managed to query the XML with the following method:
echo $xml->textbox->item->id;
What's the syntax to use a variable instead of textbox?
I've tried (but didn't work):
echo $xml[$type]->item->id;
echo $xml->[$type]->item->id;
Any ideas?