regning med php. random.
<?//Total skal indeholde en divisionsvariabel og en random afvigelse på ca 5%.
$division = "1";
$total = $division*5000;
$totalbund = "$total-$total*5%";
$totaltop = "$total+$total*5%";
$spillersum = rand($totalbund, $totaltop);
echo "$total";
echo "$spillersum";
?>
Warning: rand() expects parameter 1 to be long, string given in C:\xampp\apachefriends\xampp\htdocs\tm\spillergeneration.php on line 10
Jeg er total blank! Hvad er der ivejen? Kan jeg ikke lave et random tal med en øvre og nedre grænse fra en to variabler?
Desuden ville et link til lidt php math være bå dæjlig
