sjgoodjob Posted January 6, 2011 Share Posted January 6, 2011 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. Quote Link to comment Share on other sites More sharing options...
salathe Posted January 6, 2011 Share Posted January 6, 2011 See Example #6 on http://php.net/simplexml.examples-basic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.