in the ratings part of my current project, i have 6 variables:
$rat_0
$rat_1
$rat_2
$rat_3
$rat_4
$rat_5
now instead of doing 6 seperate if statements i want to use a
for() loop so that the number after the underscore can be automatic...
eg:
for($i=0;$i<=5;$i++) {// loop 6 times until $i is equal to 5
$rat_$i;
}
how can i make it so that the number after the underscore is automatic and then use that number to complete the rest of the name of the variable?