variables within variables - question
| From: | Phil Schwarzmann | Date: | Wed, 27 Mar 2002 18:33:15 +0000 |
| Subject: | variables within variables - question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90399@lists.php.net to get a copy of this message | ||
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?
THANKS!!!!!!!!!!!!!!!!!!!!!!!