Simplexml_load_file issue, variable gets NULL Value

ekuleri

New Member
i've used the simplexml_load_file function in one of my scripts (shown bellow) :but when i try to show some data from the xml file, it doesn't work.here is my code : \[code\]<?php$i = 0;$dir = new DirectoryIterator('Ay');foreach ($dir as $fileinfo) {if (!$fileinfo -> isDot()) { $XMLFILE = $fileinfo -> getFilename(); $pathtofile = "http://Mylink.com/Ay/$XMLFILE"; $xml = simplexml_load_file($pathtofile); if ($xml == FALSE) { echo "failed to load xml"; } else { echo "$i <br>"; $A = $xml->Organisme->Nom; echo "$A <br>"; $i++; }}}?>\[/code\]The Value of Nom doesn't show on the page, i tried showing the type of $A, and its NULLI don't know why the $A variable gets a NULL Value, even if the xml file loads correctlyif you can help that would be wonderfulthank you in advance
 
Back
Top