On Wed, 5 Mar 2003, David T-G wrote:

>   $m = count($manilist) ;
>   for ( $i=0 ; $i<$m ; $i++ )
>     { print "$i :: $manilist[$i][0]\n" ; }
>
> I simply get 'Array[0]' out for each inner..  Clearly php is seeing that
> $manilist[$i] is an array, telling me so, and then happily printing the
> "[0]"; how do I get to the value itself without having to use a temporary
> array?

Actually, it's literally printing "[0]" after it prints "Array".  PHP is
detecting that $manilist (not $manilist[0]) is an array (for which it
prints "Array"), then you get a literal "[0]"  afterwards because you put
it all within quotes.

If you print this way, you'll get what you want:

print "$i :: " . $manilist[$i][0] . "\n";

        HTH,
        ~Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to