Plik: index.php
[php:1:213e67a806]<?
include "tpl/template.inc.php";
$tpl = new Template("tpl/index.tpl");
$tpl->add("srodek", "tutaj_chcę_wstawić_funkcję_include");
echo $tpl->execute();
?>[/php:1:213e67a806]
Plik: tpl/index.tpl
[xml:1:213e67a806]
<html>
<head>
<meta http-equiv="Content-Language" content="pl">
<title></title>
</style>
</head>
<body>
{srodek} <-- chce zeby kod z pola srodek wykonał sie w tym miejscu
</body>
</html>[/xml:1:213e67a806]
Plik: tpl/template.inc.php
[php:1:213e67a806]<?
class Template {
var $tpl;
var $dane;
function Template ($name)
{
$this->tpl = implode('', file($name));
$this->dane = Array();
}
function add($name, $value = '')
{
if (is_array($name)) {
$this->dane = array_merge($this->dane, $name);
} else if (!empty($value)) {
$this->dane[$name] = $value;
}
}
function execute() {
return preg_replace('/{([^}]+)}/e', '$this->dane["1"]',
$this->tpl);
}
}
?>[/php:1:213e67a806]
Jeśli ktoś wie o co mi chodzi i wie jak tam wcisnąć php bardzo proszę o odpowiedź

[b]----
[ZMODEROWANO]
wassago: prosze uzywac odpowiednich znacznikow phpBB !! do oznaczania tresci HTML (xHTML), sluzy znacznik [XML]