bug, silly condition statement?
Posted: 23. April 2005 20:23
could not not find a place to submit bug reports so i decided to post here.
in htdocs\pdf\pdf.php, i'm rather certain that conditional statement isn't doing what it was intented to do.
this statement had me a bit confused at first, but after further thought and a test i can say with certainty that it is messed up.
output:
truetruetruetrue
have a nice day.
in htdocs\pdf\pdf.php, i'm rather certain that conditional statement isn't doing what it was intented to do.
- Code: Select all
if ($value2 != "" || $value2 != " ")
this statement had me a bit confused at first, but after further thought and a test i can say with certainty that it is messed up.
- Code: Select all
<?
if ($value2 != "" || $value2 != " ")
{ echo('true'); }
else
{ echo('false'); }
$value2 = "";
if ($value2 != "" || $value2 != " ")
{ echo('true'); }
else
{ echo('false'); }
$value2 = " ";
if ($value2 != "" || $value2 != " ")
{ echo('true'); }
else
{ echo('false'); }
$value2 = "1";
if ($value2 != "" || $value2 != " ")
{ echo('true'); }
else
{ echo('false'); }
?>
output:
truetruetruetrue
have a nice day.