I have a switch built in to set variables based on a $_POST['x'];
my echo test works on all the variables but one, and i cannot seem to find out why:
switch ($jobType) {
case "pp":
$jobType = "Pick Pocket"; //echo works 'Pick Pocket'
$success = rand(1,100); //echo works - random numbers 1-100
$threshold = 0; //echo works - '0'
$money = rand(0-100); //changed to rand(0,100) and it works
echo $money;
break;
}
the echos I named work both inside the case
and outside the switch
except for $money
. Any ideas what I am missing?
UPDATED --
switching from
1-100
to1,100
worked - thanks everyone!