Hi Peter!
In the first version of the template engine I had markers but now I
need more complex conditions or operations inside the template files,
like array of arrays and so on. I really like the freedom to be able
to just open a PHP tag and use a foreach() or whatever PHP
function as I please.
On 21 July 2010 06:46, Sorin Buturugeanu wrote:
> @Vincent: no, the short tags are not off.
>
> @Jim: This seamns to work fine:
>
> $template = file_get_contents(pathTemplates.$this->dir.$this->tpl);
> ob_start();
> $template = eval('?>'.$template);
> $template = ob_get_clean();
>
> Thanks!
>
> Be
@Vincent: no, the short tags are not off.
@Jim: This seamns to work fine:
$template = file_get_contents(pathTemplates.$this->dir.$this->tpl);
ob_start();
$template = eval('?>'.$template);
$template = ob_get_clean();
Thanks!
Best wishes!
Sorin
--
Sorin Buturugeanu
http://www.soin.ro
On We
On Wed, 21 Jul 2010 01:04:12 +0300, Sorin Buturugeanu wrote:
> Hello Vincent and thank you for your reply :).
>
> That's true, I forgot to explain how I got to using HEREDOC, so ..
>
> Using eval(file_get_contents($file)) just outputs the result on the
> spot and I need
> to get the
Hello Vincent and thank you for your reply :).
That's true, I forgot to explain how I got to using HEREDOC, so ..
Using eval(file_get_contents($file)) just outputs the result on the
spot and I need
to get the whole output (without echoing it) and do some more things with it.
require_once() doesn
> -Original Message-
> From: Sorin Buturugeanu [mailto:m...@soin.ro]
> Sent: Tuesday, July 20, 2010 2:11 PM
> To: php-general@lists.php.net
> Subject: [PHP] eval and HEREDOC
>
> Hello,
>
> I am having trouble with a part of my templating script. I'll
> try to explain:
>
> The template
6 matches
Mail list logo