Folgende tabellenberechnung muesste ich in einem Array reinpacken.
Also ausgabe waere in etwa wie folgt (funktioniert ja leider so nicht)
nur das echo zu entfernen brachte leider auch nichts.
Wie muesste ich das richtig angehen ?
PHP Code:
echo "<table border=\"1\">";
for($i = 1; $i <= 50; $i++)
{
echo"<tr>"; // neue Zeile
for($j = 1; $j <= 50; $j++)
{
echo "<td>".$koordArray[$i][$j]."</td>";
}
echo "</tr>";
}
echo "</table>";
PHP Code:
$tpl = new dyntemplate("./templates/start.htm");
$replace = Array("logout" => "<form name=\"form1\" method=\"POST\"
action=\"$PHP_SELF\">
<input type=\"image\" src=\"./images/nav/tuer.jpg\" alt=\"Absenden\" name=\"exit\">
</form>" );
$map = Array("map" =>""echo \"<table border=\\"1\\">\";
for($i = 1; $i <= 50; $i++)
{
echo\"<tr>\"; // neue Zeile
for($j = 1; $j <= 50; $j++)
{
echo \"<td>\".$koordArray[$i][$j].\"</td>\";
}
echo \"</tr>\";
}
echo \"</table>\";\n";
$tpl->compile_replace($replace);
$tpl->compile_replace($map);
$tpl->output();
Wie muesste ich das richtig angehen ?
Comment