Posted by willl69 on 11/03/05 06:42
Here is the code i have to read stings that are set out as such - {STRING}
$pattern = '/{(\w+)}/';
$replace = '$\1';
$template = preg_replace($pattern, $replace, $template);
This outputs $STRING
Anybody know how i can get the $STRING to $string within the preg_replace.
I have tried:
$replace = '$'.strtolower('\1');
but it doenst work.
Any help much appreciated.
Will
Navigation:
[Reply to this message]
|