Date: 01/11/01
- Next message: Chris Johnson: "[phplib] PHPLIB web site?"
- Previous message: Mark Heintz PHP Mailing Lists: "Re: [phplib] template: / in varname"
- Maybe in reply to: Mark Heintz PHP Mailing Lists: "[phplib] template: / in varname"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
One possible problem is that forward slash, "/", is used as the delimiter in
Template's regular expressions, preg_match("/regular expression/", $string),
at least in phplib 7.2c. You might try replacing those delimiters with
another character such as an accent character, "`".
----Original Message Follows----
From: Mark Heintz PHP Mailing Lists <heintzphp <email protected>>
To: phplib <email protected>
Subject: Re: [phplib] template: / in varname
Date: Wed, 10 Jan 2001 16:24:49 -0600 (CST)
On Wed, 10 Jan 2001, Max A. Derkachev wrote:
> Tuesday, January 09, 2001, 11:32:42 PM, you wrote:
>
> MHPML> I'm having a problem replacing varnames in templates that include
a
> MHPML> slash ( / ). For example:
> $template->>set_var('price__A/T', 'foobar');
> MHPML> Results in {price__A/T} being replaced by a null value. I've
tried
> MHPML> escaping the slash, but got the same result. I've checked the
docs and
> MHPML> the archives and didn't see anything on the subject.
> MHPML> I am using php4.0.4, and am aware of the problem with $
characters, could
> MHPML> this be related?
>
> I'm pretty sure that it is the similar problem. "/"-sign is a standard
> PCRE delimiter. You should avoid using PCRE special symbols in the
> names of template blocks and variables by now.
> Those symbols are: /{}()[]<>
Maybe I'm being shortsighted, but if template is just using a
preg_replace, isn't there any way to escape these characters?
Thanks,
mth.
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Chris Johnson: "[phplib] PHPLIB web site?"
- Previous message: Mark Heintz PHP Mailing Lists: "Re: [phplib] template: / in varname"
- Maybe in reply to: Mark Heintz PHP Mailing Lists: "[phplib] template: / in varname"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

