Smarty error on PHP include
| From: | Sonny2 at gmx dot de | Date: | Thu, 21 Nov 2002 12:35:26 +0000 |
| Subject: | Smarty error on PHP include | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6486@lists.php.net to get a copy of this message | ||
Hello,
I get the following error:
Fatal error: Smarty: [in search_casedata.tpl line 25]: syntax error: invalid
attribute name - '"$row[account_name]";' in
/www-1/src/php/lib/php/Smarty_Compiler.class.php on line 1398
On the errored line i have following:
{ php }
/*
* Get Account infos from DB
*/
$sql = "SELECT account_name,account_code from account order by
account_name";
$query = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($query) ) {
echo "<option
value=\"".$row['account_code']."\">$row['account_name']</option>\n";
}
$db->sql_freeresult($query);
{ /php }
Why does this not work ?
I use SMARTY 2.3.1 with PHP 4.2.2.
Thx in forward.
Peter
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!