I'm fairly new to PHP, so I don't see what I'm doing wrong. My basic setup is as follows:
I have several arrays:
$array1=array('a','b','c');
$array2=array('d','e','f');
etc..
Now I want to loop through the arrays and each element.
for ($arCount=1;$arCount<$maxArray;$arCount++)
{
$currArray="array".$arCount;
$idxcount = count($$currArray);
for($elemCount=0;$elemCount<$idxcount;$elemCount++)
{
/* here I want to access array1[0],array1[1]....array(n)[0..n] I thought I could do */
printf("$$currArray[$elemCount<BR>");
}
}
But, the printf prints $array1[0]... not the value. Any ideas would be appreciated.