[eluser]MARKNEUBURGER[/eluser]
Hi,
I'm working on a web application that allows for a div to have its contents filled into automatically via a jQuery Ajax request. The contents of the div are a parsed XML file. I am doing the parsing with SimpleXML (not the CodeIgniter version, as I'm running PHP 5.2.9 and have access to it as part of my PHP installation).
Everything works great in every browser except Internet Explorer (6, 7, and 8). Loading the exact same page, I get PHP errors from IE that do not appear in the other browsers, which function as expected.
The first error occurs at the second of these two lines, in my XML parser function:
Code:
$dininghall_node_array = $menu->xpath("//dininghall[@name=\"".$dininghall."\"]");
$dininghall_node = $dininghall_node_array[0];
The error is "Undefined offset: 0".
If I insert a block of code like the following directly after these two lines:
Code:
if (isset($dininghall_node)) echo "Variable set!"
else echo "Variable not set! :("
then in internet explorer, "Variable not set!

" is printed and in every other browser "Variable set!" is printed. This problem is frankly boggling my mind because I have no idea how a server side script is producing two different results based on whether or not the browser is IE.
Any thoughts?
Thanks,
Mark