Hi
I have an xml file which i am trying to display through a php script, it displays everything fine until i change the contents of the xml file to Arabic letters at which the file does not load.
here is the xml file:
<?xml version="1.0"?>
<studentmarks>
<listName>name of the student</listName>
<studentdetalis>
<studentnumber>555</studentnumber>
<subjects>
<physics>55</physics>
<chemistry>2</chemistry>
</subjects>
</studentdetalis>
</studentmarks>
and here is the php script:
<?php
$student = "test.xml" ;
$xml = @simplexml_load_file($student) or die ("no file loaded") ;
$studentlist = $xml->listName ;
echo "<h1>List: " . $studentlist . "</h1>";
foreach ($xml->studentdetalis as $studentdetalis) {
echo "<h2>Food group name is " . $studentdetalis->studentnumber . "</h2>" ;
foreach ($studentdetalis->subjects as $subjects) {
echo "<br /> physics: " . $subjects->physics ;
echo "<br /> chemistry: " . $subjects->chemistry ;
echo "<br />" ;
}
}
echo "<br />" ;
?>
when I try, for example, to change the word between listname tags to Arabic letters i get the error no file loaded.
What am I doing wrong?