<?php
$x = "1";
if (x==1){
echo "online";
}else{
echo "offline";
};
?>
what i am trying to do is get when x=1 the txt to say online
but n e thing else then it says offline
problem is that it only displays offline nomatter what x is
anyhelp?




Posted 03 January 2008 - 10:17 AM
<?php
$x = "1";
if (x==1){
echo "online";
}else{
echo "offline";
};
?>
Posted 03 January 2008 - 10:36 AM
This post has been edited by dontKnowJava: 03 January 2008 - 10:39 AM
Posted 03 January 2008 - 10:54 AM
Posted 03 January 2008 - 11:13 AM
Quote
<?php
$status="offline";
$x = 1;
if ($x==1) $status="online";
printf("%s\n",$status);
?>
This post has been edited by no2pencil: 03 January 2008 - 11:16 AM
Posted 05 January 2008 - 08:56 AM
no2pencil, on 3 Jan, 2008 - 11:13 AM, said:
Quote
<?php
$status="offline";
$x = 1;
if ($x==1) $status="online";
printf("%s\n",$status);
?>
<?php
$x = '1';
if ($x=='1'){
echo "online";
}else{
echo "offline";
}
?>
Posted 05 January 2008 - 09:08 AM
Posted 05 January 2008 - 09:31 AM
Amadeus, on 5 Jan, 2008 - 09:12 AM, said:
Posted 05 January 2008 - 09:42 AM
darklighter, on 5 Jan, 2008 - 11:31 AM, said:
Quote
Posted 05 January 2008 - 09:47 AM
Posted 05 January 2008 - 09:53 AM
Posted 05 January 2008 - 10:59 AM
