Leif, et al --
...and then Leif K-Brooks said...
%
% print $i :: {$manilist[$i][0]}\n;
Aha! Perfect. Here I'd been trying such things with the leading $ on
the *outside* of the braces.
Thanks, all, for the help!
Back on the 'net after a great all-night storm (which in fact hasn't
stopped
At 10:44 06.03.2003, David T-G said:
[snip]
...and then Leif K-Brooks said...
%
% print $i :: {$manilist[$i][0]}\n;
Aha! Perfect. Here I'd been trying such things with the leading $ on
the *outside* of the braces.
Ernest, et al --
...and then Ernest E Vogelsinger said...
%
% At 10:44 06.03.2003, David T-G said:
% [snip]
% ...and then Leif K-Brooks said...
% %
% % print $i :: {$manilist[$i][0]}\n;
% Aha! Perfect. Here I'd been trying such things with the leading $
Hi, all --
I have a two-dimensional array built from reading a file and I'm having
trouble accessing a value of an inner array. I know, particularly with
some help from print_r(), that the arrays are filled in properly.
I can do
$m = count($manilist) ;
for ( $i=0 ; $i$m ; $i++ )
{ $ml
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
Chris --
...and then Chris Wesley said...
%
% On Wed, 5 Mar 2003, David T-G wrote:
%
%$m = count($manilist) ;
%for ( $i=0 ; $i$m ; $i++ )
% { print $i :: $manilist[$i][0]\n ; }
...
%
% Actually, it's literally printing [0] after it prints Array. PHP is
Right.
% detecting that
print $i :: {$manilist[$i][0]}\n;
David T-G wrote:
OK. That works, though it isn't pretty. Is there any way I can avoid
doing the dot dance? I'd rather something like
print $i :: ${manilist[$i]}[0]\n ;
(which I know to not work! :-) than to have to open and close; that's
just not very clean
7 matches
Mail list logo