I tu się właśnie pojawia mój problem, bo gdy próbuje umieścić pętlę for za return to wyświetla się błąd krytyczny...
Tu cały plik main.inc:
<?
// Meta tagi
class Main {
public function Head() {
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html>
<head>
<link rel="stylesheet" href="default.css" type="text/css" media="all" />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
<meta name="author" content="Poozer" />
<meta http-equiv="reply-to" content="poozer.master@gmail.com" />
<meta name="description" content="Poozer Portfolio" />
<meta name="keywords" content="poozer, portfolio, strona, o, poozerze, master, mistrz, mas13r" />
<meta name="copyright" content="by Poozer 2009" />
<meta http-equiv="content-language" content="pl" />
<meta name="robots" content="ALL" />
<meta name="distribution" content="GLOBAL" />
<meta name="generator" content="CoreEditor" />
<title>Poozer Portfolio</title>
</head>';
}
// Sekcja body
public function Body($a, $b) {
<table id="imp" cellpadding="0" cellspacing="0" align="center">
<tr>
<td id="lb" rowspan="3">
</td>
<td id="logo">
</td>
<td id="pb" rowspan="3">
</td>
</tr>
<tr>
<td id="menu">';
echo '<table cellpadding="0" cellspacing="0" width="100%" height="100%" border="0"><tr><td width="100px"></td>';
$a;
echo '<td width="25px"></td></tr></table></td></tr><tr><td id="tresc"><br /><br />';
$b;
</td>
</tr><tr>
<td id="copy" colspan="3">
</td>
</tr>
</table>
</body>
</html>';
}
// Tablica z elementami menu
// Łączna długość menu wg. równania: każdy pierwszy element + ilość elementów*25px + 25px + 100px = 750px
public function Menu() {
array('125px', 'index.php', 'img/hl.png', 'img/hh.png'), array('125px', 'base.php', 'img/bl.png', 'img/bh.png'), array('125px', 'about.php', 'img/ol.png', 'img/oh.png'), array('150px', 'mail.php', 'img/kl.png', 'img/kh.png') );
for($i = 0; $i <= count($menu)-1
; $i++) { echo '<td width="'.$menu[$i][0].'">'; echo '<a href="'.$menu[$i][1].'">'; echo '<img src="'.$menu[$i][2].'" border="0" OnMouseOver="this.src=\''.$menu[$i][3].'\'" OnMouseOut="this.src=\''.$menu[$i][2].'\'"/>'; echo '</a></td><td width="25px">'; }
}
}
?>