Re: [phplib] PHP 4.0.4 problem with templates From: Max A. Derkachev (kot <email protected>)
Date: 12/21/00

Hello Padraic,

What if you change {FOO} to ${FOO} in your template,
and then $tpl->set_var ('FOO', '7.50') ?
And if you use different currencies, prepend {cur} to {FOO}.
Then $tpl->set_var(array ('cur' => '$',
                          'FOO' => '7.50');

Wednesday, December 20, 2000, 8:08:21 PM, you wrote:

PR> Any one else tried PHP 4.0.4 with the PHPLIB template class?

PR> I'm having a new problem which I think is due to the new
PR> back reference handling in 4.0.4.

PR> Specifically code like:
PR> print(preg_replace("/{FOO}/","\$7.50","Amount is {FOO}"));
PR> Results in:
PR> Amount is .50

PR> When under prior versions it resulted in:
PR> Amount is $7.50

PR> I tried escaping the "$" with "\$" but that didn't work.

PR> My PHP bug report is at:
PR> http://bugs.php.net/?id=8339

PR> Thoughts?

-- 
Best regards,
Max A. Derkachev mailto:kot <email protected>
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 

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