I feel like a dummy who has never written and if statemnt before but this baffles me…
I have this if statement:
if ($row[‘auto_fetch_flag’] == “1” );
{
echo ("We will auto fetch data for you ");
echo $row[‘auto_fetch_flag’];
}
Here is the output:
We will auto fetch data for you : 1
We will auto fetch data for you : 0
We will auto fetch data for you : 1
We will auto fetch data for you : 1
if I change it to:
if ($row[‘auto_fetch_flag’] == “ThereisnowaythatthedatabasefieldwouldeverbeequalToThis” );
{
echo ("We will auto fetch data for you ");
echo $row[‘auto_fetch_flag’];
}
Here is the output:
We will auto fetch data for you : 1
We will auto fetch data for you : 0
We will auto fetch data for you : 1
We will auto fetch data for you : 1
So the If statement runs regardless of that conditions…any ideas?