Hello all.Code:/* INITIALIZE THE XML FILE */ $xml_file=@simplexml_load_file('path/to/my/file.txt'); /* PERFORM AN ERROR TEST */ if($xml_file) { /* LOOP THROUGH THE XML */ foreach($xml_file->xml_tag AS $tag) { /* THE ARRAY */ // here i fill the array elements /* INCREMENT THE VARIABLE */ $i+=1; } } else { // my alternate code // parse it another way... }
Is there a way of determining whether or not a server supports simplexml, and if it does not, then go to my alternate code?
Thanks in advance.


Reply With Quote
