For some reason i can't remeber how to write a for loop correctly... i looked at php.net and it was no help. Sorry to bother you with this stupid question, but it's making me mad and im spending too much time trying to figure it out..
I have a function the creates random numbers called "scores()"
now i want to call that function 7 times total, so i can get 7 numbers.
I want each number to be stored in an array called ability, then print each number out...
this is the code i have... nothing is echoed... and i have made sure that if you call the funciton it returns a number
$ability = array();
// Collect Ability scores into an array
for ($i = 0; $i >= 8; $i++)
{
$ability = scores();
}
// Print out Ability Scores
echo $ability[0] . "<br>";
echo $ability[1] . "<br>";
echo $ability[2] . "<br>";
echo $ability[3] . "<br>";
echo $ability[4] . "<br>";
echo $ability[5] . "<br>";
echo $ability[6] . "<br>";
What am i doing wrong!!! ahhh im so stupid, i hate for loops