01-19-2011, 10:11 AM
|
#3 (permalink)
|
|
The Visitor
Join Date: Jan 2011
Posts: 2
Thanks: 0
|
That doesn't seem to work.
I'll explain some more.. I have some template files, that look like this:
HTML Code:
<div>
<div id="left">{ value1 }</div>
<div id="right">{ value2 }</div>
</div>
I also have template.php, which has function to change the { some_value } to $some_value.
In index.php I did:
PHP Code:
$new = replace_keywords(file_get_contents('content/main.tl'));
echo $new;
And I get all the names of $some_value, but not their values.
I tried your method, but it didn't work.
However.. I tried using eval and it worked. But I heard that it is not good to use eval, so what's the best solution for this?
|
|
|
|