Yes, that does for sure
Maxim Maletsky
www.PHPBeginner.com
-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: giovedi 4 ottobre 2001 4.02
To: 'Job Miller'; 'Maxim Maletsky (PHPBeginner.com)';
[EMAIL PROTECTED]
Subject: RE: [PHP] associative a
gt;
>
> -Original Message-
> From: Maxim Maletsky (PHPBeginner.com)
> [mailto:[EMAIL PROTECTED]]
> Sent: giovedi 4 ottobre 2001 2.02
> To: 'Job Miller'
> Subject: RE: [PHP] associative array syntax question
>
>
>
> I tried on winXP/PHP4.0.6/Apache
>
&
ED]]
Sent: giovedi 4 ottobre 2001 2.44
To: Maxim Maletsky (PHPBeginner.com); [EMAIL PROTECTED]
Subject: Re: [PHP] associative array syntax question - got it!
Maxim,
I figured it out. Thanks for your help
PHP can't interpolate within string when nested
associative array is used. the nested aa m
sky (PHPBeginner.com)
> [mailto:[EMAIL PROTECTED]]
> Sent: giovedi 4 ottobre 2001 2.02
> To: 'Job Miller'
> Subject: RE: [PHP] associative array syntax question
>
>
>
> I tried on winXP/PHP4.0.6/Apache
>
>$a = Array('print me');
>
-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]]
Sent: giovedi 4 ottobre 2001 2.02
To: 'Job Miller'
Subject: RE: [PHP] associative array syntax question
I tried on winXP/PHP4.0.6/Apache
0);
print $a[$b['b'
--Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]]
Sent: giovedi 4 ottobre 2001 2.21
To: [EMAIL PROTECTED]
Subject: RE: [PHP] associative array syntax question
here is sample output from my script:
win98/Apache 1.3.19/php4.0.5
variable being displayed = value
$row[TICKER] = NTAP
$t
Hi Job. This works for me (and *should* always work) :
$a = array('foo' => 'bar');
$b = array('b' => 'foo');
print $a[$b['b']]; // prints bar
How _exactly_ are you calling it? (provide a short standalone ex)
Does the above example work for you?
What version of php?
regards,
Philip Ol
Job Miller [mailto:[EMAIL PROTECTED]]
> Sent: giovedi 4 ottobre 2001 1.41
> To: [EMAIL PROTECTED]
> Subject: [PHP] associative array syntax question
>
>
> why does: print $a[$b['b']] return:
>
> parse error, expecting `T_STRING' or `T_VARIABLE' o
D]
Subject: [PHP] associative array syntax question
why does: print $a[$b['b']] return:
parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
but if I do it in two steps like:
$c=$b['b'];
print $a[$c];
it works fine.
I have tried dozens of syntax co
why does: print $a[$b['b']] return:
parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING'
but if I do it in two steps like:
$c=$b['b'];
print $a[$c];
it works fine.
I have tried dozens of syntax combinations using
quotes, no quotes, on one or both and can't get
anything to work.
10 matches
Mail list logo