Forum Moderators: coopster
I have written a small bit of code that generates a random number, based on a test of another random number. Code is as follows:
$x = mt_rand(1,10)
if ($x == 5) {
$xb = mt_rand(1,5);
}
else {
$xb = 0;
}
However, everytime the script is executed, if returns the following error: Parse error: parse error, unexpected T_IF
I have tried several variations of this code, but no matter how I change it, it still keeps returning that same error.
Can anyone please help?
Thanks in advance for your replies :-)