I have a php page that recieve a list of variable number of arrays (it can be one array, or even 10), and what i want the cycle to do is, is to print out each value contained in each array.
Example of variables recieved through POST:
([course1] => Array ( [0] => BBB [1] => YA ) [course2] => Array ( [0] => EWA) [course3] => Array ( [0] => aaa))
Code: Select all
for($i = 0; $i < $num_course; $i++) // num_course is the number of arrays (course0,course1) that are recieved
{
$test = "course".$i;
for($x = 0; $x < sizeof([color=#FF4000]$test[/color]); $x++)
{
echo("[color=#FF4040]$test[$x][/color]");
}
}
i hope i made myself clear
I would glady appreciate any help!