mhamilton3
Programmer
- Oct 31, 2001
- 129
I have a variable list of paramters that can be passed in to a PHP script. They are var1, var2, var3, etc. I want to use a loop to step through the list and I don't know how to do it.
$i = 0;
do {
print $var$i
if (!$var$i) {
break;
}
}
I want the print statement to print the contents of the variable var1, then the contents of var2, etc. Any help would be greatly appreciated. Thanks
$i = 0;
do {
print $var$i
if (!$var$i) {
break;
}
}
I want the print statement to print the contents of the variable var1, then the contents of var2, etc. Any help would be greatly appreciated. Thanks