Note Equal (!=) is not working with the XML Data in php
Below is my codes,
<?php
$xd1 = simplexml_load_string('<?xml version="1.0"?>
<ServiceResponse>
<ServiceHotel>
<BookingStatus>CANCELLED</BookingStatus>
</ServiceHotel>
<ServiceHotel>
<BookingStatus>CANCELLED</BookingStatus>
</ServiceHotel>
</ServiceResponse>');
$a = $xd1->ServiceHotel[0]->BookingStatus;
$b = $xd1->ServiceHotel[1]->BookingStatus;
if ($a == $b):
echo 'Equal';
endif;
?>
Here $a and $b is equal value 'CANCELLED'. But its not accept in the IF condition