
January 26th, 2013, 09:55 AM
|
|
Contributing User
|
|
Join Date: Dec 2012
Posts: 42
Time spent in forums: 5 h 48 m 13 sec
Reputation Power: 1
|
|
|
If else not working
Hi,
It is always executing only IF statement. It never goes to ELSE statement. Not sure why?
Please advise.
PHP Code:
<?php
$_SESSION['numstart'] = mt_rand(2,3);
$t=$_SESSION['numstart'];
echo $t ;
If ($t = 2)
{
echo $t ;
}
else
{
echo "no" ;
}
?>
|