i have a script what give is working via $ErrorCode = 0x1 or 0x2 or 0x4 or 0x8 ...
this code is working is give me the right status msg:
<div class="left_content">Submit:</div>
<div class="right_content">
<?php echo ($errorCode & 0x1) != 0x1
? "<span class='green'>Ok</span>"
: "<span class='red'>Fail</span>"; ?>
</div>
but i try to change the code with this, but this code all time the status msg is "Ok" even if is fail
if(($errorCode & 0x1) != 0x1 )
{
$Error_0x1 = "<span class='green'>Ok</span>";
} else
{
$Error_0x1 = "<span class='red'>Fail</span>";
}
what im doing wrong ?