$field2 = "<".$$field;

-----Original Message-----
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 12:33 PM
Subject: [PHP] variables within variables - question

Im having a VERY hard time trying to explain this....
Here is a bit of my code...
for ($i = 0; $i < $num_fields; $i++)
 $field = mysql_field_name($result, $i);
 $field2 = "<".$field;
 $output = str_replace($field2, $field), $output);
The problem I'm having here is that the variable $field contains a
string (a name of one of my fields in my table).  I need for the
variable $field to actually point to the another variable, not just
contain the string.
This little loop here is supposed to go through a RTF file and replace
all the $field2 it finds with $field.
Am I making sense? 

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to