Stupid array question

From: Date: Sat, 18 Aug 2001 11:28:27 +0000
Subject: Stupid array question
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1353@lists.php.net to get a copy of this message
Hello, OK call me dumb ass but I fail to loop through a very simple array. I usually use something like this : foreach ( ...... ) { array_push ($myarray, array('category' =>$category,
		        'version'	=>$version, and so on.....
And I loop through this in the template file by {section name=myarray loop=$myarray} {$myarray[myarray].category} {$myarray[myarray].version} and so on ....... I'd like to try : foreach ( ...... ) { $id = $t['id']; $myarray[$id]['category'] = $category; $myarray[$id]['version] = $version; and so on.... And I fail stupidly to write the template {section}... Any help VERY MUCH appreciated ;-)) Luc

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