CerealBH Posted February 4, 2008 Share Posted February 4, 2008 if ($line['proof']) { $stamp = $line['stamp'] - 1; } if $line['proof'] = 0 the it would make that statement false correct and the if would not evaluate between the {}?? Link to comment https://forums.phpfreaks.com/topic/89424-solved-quick-silly-questions-about-booleans/ Share on other sites More sharing options...
bpops Posted February 4, 2008 Share Posted February 4, 2008 Your sentence is very confusing, but if you're asking what happens when $line['proof'] = 0, then the answer is that the expression $line['proof'] will evaluate to FALSE, and the if statement will not run. Link to comment https://forums.phpfreaks.com/topic/89424-solved-quick-silly-questions-about-booleans/#findComment-457917 Share on other sites More sharing options...
Stooney Posted February 4, 2008 Share Posted February 4, 2008 Correct false = 0 = "" They're all the same thing in a way. So if $line['proof'] was empty, if it contained 'false' or 0, the if statement would evaluate as false. Link to comment https://forums.phpfreaks.com/topic/89424-solved-quick-silly-questions-about-booleans/#findComment-457918 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.