Re: getting an variable value from an array entry
| From: | Ian Truelsen | Date: | Sun, 30 Nov 2003 21:04:08 +0000 |
| Subject: | Re: getting an variable value from an array entry | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171419@lists.php.net to get a copy of this message | ||
On Sun, 30 Nov 2003 21:44:50 +0100
"Bronislav Klucka" <Bronislav.Klucka@pro2-soft.com> wrote:
> The temperature is $$temp
>
Unfortunately, that is not working for me. I have tried changing it in
the text file, but that just outputs $$temp instead of the value of
$temp. What I have is the array words, for which the relevant entry is
words[3] being equal to "$temp". What I need to be able to do is to
print $words[3]; in such a way that it outputs the value of $temp and
not the value of $words[3].
I also tried print $$words[3] but that outputs nothing. I tried print
$($words[3]); but that gives a parse error. And print ${$words[3]}
prints out nothing.
Thanks for the help though.
--
Ian Truelsen
Email: ian@ihtruelsen.dyndns.org
AIM: ihtruelsen
Homepage: http://www.ihtruelsen.dyndns.org
Signature key (742B740D) available at pgp.mit.edu
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]