|
Posted by Raj on 10/30/50 11:33
"Chung Leong" <chernyshevsky@hotmail.com> wrote in message
news:1133377396.630480.258350@g14g2000cwa.googlegroups.com...
> What you need is
>
> $tmp = preg_replace('/<!-- (\S+) -->/ge', '$values[\1]', $line);
>
> The quotes are needed around $values[\1] because you want to pass it as
> code to PCRE.
Thanks Chung...this worked:
$tmp = preg_replace('/<!-- (\S+) -->/e', '$values["\1"]', $line);
Thanks all for your help!
Regards,
Raj
Navigation:
[Reply to this message]
|