Re: print "$array[$i][0]" pukes

From: Date: Thu, 06 Mar 2003 13:06:30 +0000
Subject: Re: print "$array[$i][0]" pukes
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-138458@lists.php.net to get a copy of this message
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 $ on % >the *outside* of the braces. % --------------------[snip]-------------------- % % Try to see it this way: $manilist[$i][0] is a PHP expression, thus needs to % be put in curly braces _as_a_whole_ within a string. Right. What I hadn't seen before is that $manilist[$i] is NOT evaluated like {$manilist}[$i] but as {$manilist[$i]} and so that's why I was putting the $ outside the {}. Some things about php aren't quite as perl-ish as others :-) Thanks & HAND :-D -- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#138458) next »