4images Forum & Community
4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: Axel on March 20, 2003, 02:21:48 PM
-
Hallo,
ich include in die Temlates auch eine Navi. Da klappt auch.
Sobald ich jedoch die Zeilen inder Navi mittels
<?php
$color = "";
if ($mark == "3")
{
$color = "bgcolor=\"#FF9900\"";
}
else
{
$color = "";
}
?>
<tr>
<td height="17" colspan="3"
<?php
echo $color
?>
>
je nach Wert farbig machen möchte, erhalte ich
Parse error: parse error in /pfad/includes/template.php(133) : eval()'d code on line 383
Auch mit der eigentlich üblichen schreibweise:
<td height="17" colspan="3" <?php echo $color ?>>
erhalte ich gleiche Fehlermeldung.
Wie könnte ich das lösen?
-
sorry for english respond.
u MUST put open ( <?php ) and closing ( ?> ) php tags ALONE in the line, and without ANYTHING, not even spaces on same line.
here is how your code should looks like:
<?php
$color = "";
if ($mark == "3")
{
$color = "bgcolor=\"#FF9900\"";
}
else
{
$color = "";
}
?>
<tr>
<td height="17" colspan="3"
<?php
echo $color
?>
>
-
Sorry, but I speak no English.¶
Where is the difference to my first variant?¶
-
wrong:(http://home.attbi.com/~vanowm/var2.gif)
correct:(http://home.attbi.com/~vanowm/var1.gif)
-
Ok. :?
In addition, it does not function in such a way unfortunately.
The error message remains the same. :(
-
ops...missed the mistake:
echo $color;
-
Thanks. :D
That was the error. :wink: