NYCPHP Meetup

NYPHP.org

[nycphp-talk] Looking for a PHP equivalent to Perl Text::Template

Emmanuel. M. Decarie emm at scriptdigital.com
Mon May 5 19:34:26 EDT 2003


Thanks Chris, I will test your solution and try to build a wrapper around it.

Cheers
-Emmanuel

>You could do essentially this by bringing the template into your
>controlling script and eval()'ing it -- something like:
>
>$template= file_get_contents("/path/to/template.html");
>$command= "\\$output= \\"$template\\";";
>eval($command);
>print $output;
>
>
>You couldn't pull off the sprintf() call in the middle of that, but
>everything else will work. You don't even need the curly brackets.
>
>     chris.

-- 
______________________________________________________________________
Emmanuel Décarie / Programmation pour le Web - Programming for the Web
Radio UserLand/Frontier - Perl - PHP - Javascript  <http://scriptdigital.com/>
Blog: <http://blog.scriptdigital.com> - AIM: scriptdigital




More information about the talk mailing list