Re: Array help.

From: Date: Fri, 22 Nov 2002 13:43:25 +0000
Subject: Re: Array help.
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6504@lists.php.net to get a copy of this message
try this: {section name=nav loop=$opposition_nav_array} {assign var="navid" value=$opposition_nav_array[nav]} <option value="/main/s{$navid}.php"> {$club_array[$navid]} </option> {/section} The problem is you cannot cascade arrays with current smarty version. Things like {$array1[$array2[$index]]} simply don't work. Bye, André "John Wards" <j.wards@sportnetwork.net> schrieb im Newsbeitrag news:200211221233.27028.j.wards@sportnetwork.net... Hi, I am having bother with an array anyone got anyideas? Here is what I want to do: I have two arrays with the structure: {$club_array} 17 => East Fife 162 => Montrose FC 23 => Queens Park {$opposition_nav_array} 0 => 17 1 => 162 2 => 23 I want to run a section like this: {section name=nav loop=$opposition_nav_array} <option value="/main/s{$opposition_nav_array[nav]}.php"> {$club_array[$opposition_nav_array[nav]]} </option> {/section} This bit is causing me the problem: {$club_array[$opposition_nav_array[nav]]} $club_array has keys which equal the values of $opposition_nav_array and the above doesn't work. Any clues? Cheers John Wards

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