RE: [SMARTY] Looping through a four-dimensional array

From: Date: Tue, 15 Oct 2002 16:25:10 +0000
Subject: RE: [SMARTY] Looping through a four-dimensional array
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6161@lists.php.net to get a copy of this message
Why are you using 4-dimensional arrays? :) I'm pretty sure you can nest section statements... just set the loop attribute to the next deeper dimension within each nest, and use unique names... But still, why are you using 4-dimensional arrays? Are you using smarty to map the space-time-continuum? ;) -- Josh -----Original Message----- From: Johannes Schill [mailto:johannes.schill@polyester.se] Sent: Tuesday, October 15, 2002 10:05 AM To: smarty-general@lists.php.net Subject: [SMARTY] Looping through a four-dimensional array Hello, Anyone who've managed to loop through a four-dimensional array using section? This is an example of how my array looks like: $goldTexts[0][0][0][url] This is where i assign it: $smarty->assign("goldTexts", $goldTexts) And this is my section-tag(s): {section name=gTxt loop=$goldTexts} {$goldTexts[gd_Id][0][gTxt].url} {/section} The problem is: it doesnt loop through the whole array, only the first value. Any suggestions? I'll let you know if I manage to solve it though. Best regards, Johannes Schill -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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