#\[([^\]].*)\]#
preg_match("#\[action\_engine\](.*)\]\/action\_engine\]#", $content, $arr);
#\[action_engine\](.*)\[/action_engine\]#isU
[action_engine]
<tr>
<td>{views}</td>
<td>{theme}</td>
<td>{author}</td>
<td>{date}</td>
<td>{checked}</td>
</tr>
[/action_engine]
Array
(
[0] => [action_engine]
{views}
{theme}
{author}
{date}
{checked}
[/action_engine]
[1] =>
{views}
{theme}
{author}
{date}
{checked}
)
echo htmlspecialchars(print_r($var, 1));
Цитата (Shkiper @ 4.01.2013 - 20:55) |
Игорь_Vasinsky с исходником все в порядке, проверено |
Цитата (Shkiper @ 4.01.2013 - 20:27) |
killer8080 ну а как тогда посоветуешь? |
function parse_tpl($tpl_file, $params = array()){
if(!file_exists($tpl_file))
die ("Error: Template file $tpl_file does not exist!");
ob_start();
extract($params);
include $tpl_file;
return ob_get_clean();
}
Цитата (Shkiper @ 4.01.2013 - 22:33) |
но такой вариант меня не устраивает |