The temperature is $$temp Brona
> -----Original Message----- > From: Ian Truelsen [mailto:[EMAIL PROTECTED] > Sent: Sunday, November 30, 2003 9:27 PM > To: php > Subject: [PHP] getting an variable value from an array entry > > > I am trying to do the following: > > I have a text file to read in that contains something like "The > temperature is $temp" > > This gets read into an array so that I can parse it out word by word > (the only way I could think to do this, any other ideas are welcome). I > do a test to see whether the first letter is a $ and then pull try to > print $temp. > > What I can't figure out is how to have the value of $temp printed as > opposed to "$temp" which is where I am at the moment. I have tried the > complex {} approach from the manual, but it doesn't get me what I am > looking for. > > Can anyone tell me what the appropriate syntax would be for doing this? > Or some other way to deal with the issue would be good as well. > > Thanks in advance. > > -- > Ian Truelsen > Email: [EMAIL PROTECTED] > AIM: ihtruelsen > Homepage: http://www.ihtruelsen.dyndns.org > Signature key (742B740D) available at pgp.mit.edu > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php