Jump to content

Some SimpleXML problem


sjgoodjob

Recommended Posts

Description:

------------

Doing the following SimpleXML text comparison does not give the expected results.

 

Reproduce code:

---------------

<?php
$sxe = simplexml_load_string('<root a="123" />');

echo $sxe['a']."\n";

if ($sxe['a'] == '123')
{
echo 'They are equal.'."\n";
}
else
{
echo 'They are not equal.'."\n";
}
?>

Expected result:

----------------

123

They are equal.

 

Actual result:

--------------

123

They are not equal.

 

Link to comment
https://forums.phpfreaks.com/topic/223549-some-simplexml-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.