Building output from an array(array(array(array())))

From: Date: Sat, 13 Nov 2004 16:06:21 +0000
Subject: Building output from an array(array(array(array())))
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11958@lists.php.net to get a copy of this message
Hey all, I have an array of values that I want to display and I cannot seem to get the correct template syntax/structure do do it. Here is the array that I am assiging to smarty. Basically it is made up of 2 colums of a database (URL and TARGET): ********************************* [_tpl_vars] => Array
       (	
[user_navlinks] => Array
               (
                   [0] => Array
                       (
                           [0] => Array
                               (
                                   [0] => http://www.yahoo.com
                                   [1] => http://www.google.com
                               )
                       )
                   [1] => Array
                       (
                           [0] => Array
                               (
                                   [0] => _blank
                                   [1] => _new
                               )
                       )
************************************** I then want to create an href link from these values, but I cannot seem to figure out how to pull one item from each array (one from URL, one from TARGET_, display them, then pull values from the next rows, like this: <a href="http://www.yahoo.com" target="_blank">http://www.yahoo.com</a> <a href="http://www.google.com" target="_new">http://www.google.com</a> ************************************** I have tried foreach, and section, but can't seem to display the user_navlinks array in that fashion. Any ideas?

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