Link to home
Start Free TrialLog in
Avatar of Quetysis
Quetysis

asked on

Help needed in looping through variable names

I need some help getting a loop together.  Basically, I have variables named, chkbox1, chkbox2, chkbox3, etc.  There are 64 of them total.  I want to loop through them all and see if they are set.  

For example:

for ( $i=1;$i<64;$i++ ) {
     if ( isset($ChkBox,$i) ) {
          echo "Variable ChkBox", $i, " is set", "<br>";
     }
}

ASKER CERTIFIED SOLUTION
Avatar of Zyloch
Zyloch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Quetysis
Quetysis

ASKER

Thank you!!!!!