Log in

View Full Version : PHP variables in the replacements


bigmattyh
04-27-2002, 09:00 PM
To anyone who knows:

Do you know if it would be possible to have dovars() actually parse the replacements so that variables within them could be resolved? As in:

{ imagesfolder } => /images/$styleid

I imagine it would entail moving some statements around or something, but I don't want to mess with it without soliciting the experience of someone who might know.

Matt

Admin
04-28-2002, 10:23 AM
Try replacing this in functions.php:
return $newtext;
With this:
global $styleid;
return str_replace('$styleid', $styleid, $newtext);

bigmattyh
04-28-2002, 06:06 PM
Thanks, Double-F.

:)