Hi all,
I have a query about displaying something based on a result from the DB. I want to show an aspect of a car, and depending on what category this car is in, it will come back with a "1" or a "0". "1" meaning yes it has it, and "0" no it don't.
The code I wrote always seems to say "Yes" whatever, even if I know that the Air_Con category has a no in it!
Please could someone point me out to my mistake!
Code:
<?php if ($row_carexample['Air_Con'] = "1"
{ echo "Yes"; }
elseif ($row_carexample['Air_Con'] = "0"
{ echo "No";}
?>
Cheers.
I have a query about displaying something based on a result from the DB. I want to show an aspect of a car, and depending on what category this car is in, it will come back with a "1" or a "0". "1" meaning yes it has it, and "0" no it don't.
The code I wrote always seems to say "Yes" whatever, even if I know that the Air_Con category has a no in it!
Please could someone point me out to my mistake!
Code:
<?php if ($row_carexample['Air_Con'] = "1"
{ echo "Yes"; }
elseif ($row_carexample['Air_Con'] = "0"
{ echo "No";}
?>
Cheers.