Re: [SMARTY] generating php

From: Date: Sat, 08 Jun 2002 17:47:37 +0000
Subject: Re: [SMARTY] generating php
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4698@lists.php.net to get a copy of this message
This template: {$foo} will generate <?php echo $foo; ?> What are you trying to accomplish anyways? Monte Travis Low wrote:
Okay, you got me. Funny. :-) So let me rephrase. I'd like to take a PHP file, say "hello.php": <? echo "hello, world\n"; ?> And change it to "hello.php.tpl", like so: <? echo "{$hello_world}\n"; ?> And have it generate something resembling the original .php file. I tried it (with something more complicated) and got a lot of errors. I didn't have time to figure it out, so I solved the problem a different way. But if someone is doing this sort of thing routinely, please speak up. I'd like to hear how you approach the problem. cheers, Travis Monte Ohrt wrote:
Yes, with every template ;-) Travis Low wrote:
Anyone out there using Smarty to generate PHP code? I don't think it's possible, but I wanted to check. cheers, Travis
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.general (#4698) next »