Code: Select all
for($i=1;$i<6;$i++){
if(!empty($pollq.$i)){pollq1
pollq2.... through pollq5
which when cleaned and checked are turned into $pollq1 through $pollq5
I want to loop through them and do
if(!empty(pollq1))
if(!empty(pollq2))
but I'm having problems appending the $i onto the $pollq, so my variable names would be $pollq1, $pollq2, $pollq3, etc
I've tried
Code: Select all
if(!empty($pollq.$i))Code: Select all
if(!empty($$pollq.$i))do I need to use eval?