Search found 4 matches
- Sat Dec 04, 2004 1:00 am
- Forum: PHP - Code
- Topic: Evaluating variables in included file
- Replies: 7
- Views: 552
Mostly cause the templates will be edited by a very limited htmlarea-like editor and I wanna keep them as simple as possible. Perhaps I'll go with some kind of string replace anyway, I'm not sure yet. Speed is not an issue since this script simply outputs an html file when the content changes, inste...
- Sat Dec 04, 2004 12:14 am
- Forum: PHP - Code
- Topic: Evaluating variables in included file
- Replies: 7
- Views: 552
- Fri Dec 03, 2004 11:39 pm
- Forum: PHP - Code
- Topic: Evaluating variables in included file
- Replies: 7
- Views: 552
Ok, I did this:
Perhaps there's a better solution?
Code: Select all
$page = "print <<< END_OF_TEMPLATE\n" . file_get_contents("template.html") . "\nEND_OF_TEMPLATE;\n";
eval($page);- Fri Dec 03, 2004 11:00 pm
- Forum: PHP - Code
- Topic: Evaluating variables in included file
- Replies: 7
- Views: 552
Evaluating variables in included file
Hi all. I want a very basic template system where the templates look like this: <h1>{$header}</h1> <p>{$paragraph}</p> and the php code: <?php $header = "Headline"; $paragraph = "content, content, content"; // Here, s...