Re: newbie: a very simple question (I hope)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I know how to print out the value of $x, but not the
test result of 'true or false'.



A couple of ways to do this. Probably the easiest is to cast the true / false answer to an int and then echo that answer.


$x = 3;
$bool = ++$x < 4;
echo (int) $bool;

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux