SOLVED: if/else problem
Posted: Wed Mar 03, 2010 7:37 pm
I'm iterating through a result set.
Within the display while loop I have a construct like this
No matter what, "YES" is always echoed.
If I just I get either 0 or 1 (corresponding to the data in the DB)
In the if/then construct I have tried:
I have also tried testing for "1" ( i.e. . . . if ($row['Group_Show']='1' ) and reversing the logic.
As I mentioned above, no matter what, "YES" is always echoed.
This must be something REALLY simple. ARGHH!
Thanks for any insight.
Within the display while loop I have a construct like this
Code: Select all
if ($row['Group_Show']='0')
{ echo '<td>NO</td>'; }
else
{ echo '<td>YES</td>'; }If I just
Code: Select all
echo $row['Group_Show'];In the if/then construct I have tried:
- $row['Group_Show']='0'
- $row['Group_Show']="0"
- $row['Group_Show']=0
I have also tried testing for "1" ( i.e. . . . if ($row['Group_Show']='1' ) and reversing the logic.
As I mentioned above, no matter what, "YES" is always echoed.
This must be something REALLY simple. ARGHH!
Thanks for any insight.