Try switing the modifier to "e". "E" is not a supported modifier according
to the manual. Only the following are supported:
i
m
s
x
e
A
D
S
U
X
If you are trying to match a $ in your code, just use a backspace to escape
it. But I don't think that was your problem...
--
Plutarck
Should be working on something...
...but forgot what it was.
""Grant Walters"" <[EMAIL PROTECTED]> wrote in message
003801c0cc59$7d2b01a0$[EMAIL PROTECTED]">news:003801c0cc59$7d2b01a0$[EMAIL PROTECTED]...
> Hi,
>
> I'm having problems stopping preg_replace from losing $ signs and
following text when replacing with array variables. I am trying
> to use the E modifier and keep getting:
>
> "Warning: Unknown modifier 'E' in script.WEB.php3 on line 413"
>
> $template=array(
> "/({PAGETOP})/E",
> "/({PAGEMIDDLE})/E",
> "/({PAGEBOTTOM})/E"
> );
>
> $pagevars=array(
> "PAGETOP" => $pagetop,
> "PAGEMIDLE" => $pagetop,
> "PAGEBOTTOM" => $pagenavbar,
> );
>
> Text from assorted sources such as database records or external files are
placed into the variables $pagetop ...
>
> $page = "{PAGETOP}{PAGEMIDDLE}{PAGEBOTTOM}";
> $page = preg_replace($template,$pagevars,$page);
>
> Other modifiers seem to be accepted. Any help appreciated.
>
> Regards
>
> Grant Walters
> Brainbench 'Most Valuable Professional' for Unix Admin
> Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND
> Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]