Results 1 to 2 of 2
I have XAMPP the 1.6.6 version. The trouble is that the boolean value of 1 is displayed but 0 is not. For example:
Code:
<?php
$raw = 18;
$result = ...
- 06-28-2008 #1Linux User
- Join Date
- Jun 2007
- Posts
- 458
Bool 0 not displayed PHP
I have XAMPP the 1.6.6 version. The trouble is that the boolean value of 1 is displayed but 0 is not. For example:
then the value 1 is displayed but:Code:<?php $raw = 18; $result = ( $raw == 18 ); echo $result; ?>
then 0 is not displayed! What to do?Code:<?php $raw = 17; $result = ( $raw == 18 ); echo $result; ?>
"When you have nothing to say, say nothing."
- 06-28-2008 #2
I don't exactly understand what you're trying to do...
but this looks kinda awkward, its like saying 1 = 2 o_O...
if you want a logical way and output try this :
<?php
$raw = 18;
if( $raw == 18 )
{
$result = 1;
echo $result;
}
else
{
$result = 0;
echo $result;
}


Reply With Quote