ok i've run into a little roadblock here .. I'm trying to pull out a variable and make a new variable out of it ($f4 for example). the following lines will work in my code:
but since i expect [i] to change depending on how many checkboxes the user clicks, I want to put it in a for loop but it just won't work! is there a bug in PHP?Code:$var="f".$num[0]; $$var = 1; $var="f".$num[1]; $$var = 1; $var="f".$num[2]; $$var = 1; $var="f".$num[3]; $$var = 1;
Code:for ($i=0; $i < 10; $i++) { $var="f".$num[i]; $$var = 1; }




Bookmarks