Mam taki kod:
<?php
global $headerinclude, $header, $theme, $footer;
$champ = array("champZ", "champF", "champT", "champD"); foreach ($champ as $key => $val) {
echo "champ[" . $key . "] = " . $val . "<br/>"; }
$template='
<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
foreach($champ as $key => $val) {
<div class="tborder" style="height: 150px; width: 100px; float: left; margin: 5px;">
<div class="trow1" style="height: inherit; width: inherit;">
<img src="images/champs/gragas/avatar.png" style="height: 80px; width: 80px; padding-left: 10px; padding-right: 10px; padding-top: 10px; padding-bottom: 5px;">
<center><strong><a href="#">Champ</a></strong></center>
</div>
</div>
}
<br />
{$footer}
</body>
</html>
';
add_breadcrumb($pages['name']);
eval("\$page=\"".$template."\";");
output_page($page);
?>
Wszystko wyświetla się jako zwykły ciąg razem z foreach.