Re: Sv: [phplib] PHP > 4.0.3pl1 From: Ben Curtis (benc <email protected>)
Date: 05/07/01

Actually, I goofed -- the problem is when $ is in the variable, not the template...

$t->set_var('somevar','$12345');

doh

On Mon, May 07, 2001 at 01:29:27PM -0700, Ben Curtis wrote:
> Basically the problem is this...
>
> -- template.txt --
> You owe me ${amountowed}
> -- template.txt --
>
> -- owe.php --
> <?php
>
> $t = new Template('.');
> $t->set_file('junk','template.txt');
> $t->set_var('amountowed',12345);
> $t->pparse('out','junk');
>
> ?>
> -- owe.php --
>
> -- expected results --
> You own me $12345
> -- expected results --
>
> -- actual results --
> You owe me 345
> -- actual results --
>
> On Mon, May 07, 2001 at 09:36:13PM +0200, Klaus Seidenfaden wrote:
> > >PHP changed its regex handling in 4.0.4, causing nasty
> > >problems with templates containing ${somevarname}.
> > >There was some discussion on this list a while back about
> > >the problem, but I never saw a patch.
> >
> > (Sorry, no solution, but:) I have 4.0.4pl1 and am headed toward templates, so I'd like to hear more about this problem before I run into it (I'm relatively new to this list).
> >
> > -- Klaus.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> > For additional commands, e-mail: phplib-help <email protected>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>