On 21 July 2010 06:46, Sorin Buturugeanu m...@soin.ro 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!
Best
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
-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 itself is
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()
On Wed, 21 Jul 2010 01:04:12 +0300, Sorin Buturugeanu m...@soin.ro 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
@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 Wed,
6 matches
Mail list logo