i'm trying to pass the value 10 to a function to get it to print up to ten
but it won't work
my while loop won't pick up the 10 at al
here's the calling code:
build_select_start("Number of Questions","number_of_questions");
build_numerical_list(10);
build_select_end();
so i'm ending up with putting while($i <11)
rather than using the parameter thats being passed (10)
I'd rather use :
function build_numerical_list($max_num)<- 10 is passed here
{
global $admin_body,$max_num;
$i=1;
while($i<$max_num)
{
$admin_body.="<option value=\"$i\">$i</option>\n";
$i++;
}
return $admin_body;
}
cheers
GM