Consider the following code:
$ary1 = array ("one","two");
$ary2 = array ("three","four");
$2d_Dimension[] = $ary1;
$2d_Dimension[] = $ary2;
// is $2d_Dimension a 2 dimensional array?
// and the next question, how to get out content of the $2d_Dimension[]
array
while ( list ( $rec_no, $ary ) = each ( $2d_Dimension ) )
{
echo ("Record No $rec_no:");
while ( list ( $element1, $element2 ) = each ( $ary ) )
echo "$element1, $element2";
}
// I want to use the above code to print something like
// Record No 0:one, two
// Record No 1:three, four
// But I only got the following
//Record No 0:
//Warning: Variable passed to each() is not an array or object in
d:/project/bizvista/testinc.php on line 27
What's the problem?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]