RE: [PHP] Variables and Strings
| From: | Jay Blanchard | Date: | Thu, 29 Dec 2005 22:03:44 +0000 |
| Subject: | RE: [PHP] Variables and Strings | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227988@lists.php.net to get a copy of this message | ||
[snip]
Thanks for the responses guys, but what i'm saying is i would like to return
all the variable names i have in a string,
$String="Blah Blah Blah $VarName Blah Blah Blah";
$Vars=myspecialfunction($Varname);
echo ($Vars);
that code would produce $Varname, if there were more variables it would also
return the Variable Names in an array
[/snip]
And you call yourself Superman?!?
Keep in mind that the variable name in a double quoted string is
interpreted, you would have to use an outside process to read each line of
the file, locate the lines where the variables are, and then process to your
liking.