problem with array with only one index

From: Date: Wed, 14 Aug 2002 15:57:39 +0000
Subject: problem with array with only one index
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5707@lists.php.net to get a copy of this message
Hi, I have a little problem. I have generated an array with only one index, so I don't need to use the {section}-method. The index is known by the variable $_GET['news_id']. So now, I wanted to post the topic of the newspost, but Smarty gives an error. In my HTML file: {$newsListData[$smarty.get.news_id].news_topic} In my PHP file: $newsListData[$db->result(0,0)]['news_topic'] = $db->result(0,1); If u try {$newsListData[3].news_topic} with ?news_id=3 in the URL, it works fine. Any suggestions? Thanks, Peter

« previous php.smarty.general (#5707) next »