Hi all i have an xml file e.g
on my php file i use
but it only retrieve the recipe id and name so how can i retrieve the instructions.
Code:
<recipe> <id>abc</id> <name>abc</name> <instructions> <instruction> <id>abc</id> <text>abc</text> </instruction> <instruction> <id>abc2</id> <text>abc2<text> <instruction> <instructions> <recipe>
Code:
$url = "cafe.xml";
// get xml file contents
$xml = simplexml_load_file($url);
// loop begins
foreach($xml->recipe as $recipe)
{
code;
}
Comment