looping two different arrays in one section.

From: Date: Tue, 03 Apr 2001 15:01:20 +0000
Subject: looping two different arrays in one section.
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-509@lists.php.net to get a copy of this message
Hi! This mighht be a stupid question (but where I come from there are now stupid questions), so I guess not. Enough with the babbling, and to the matter. I have to arrays: $flikar = array("One", "Two", "Three") $typ = array("on", "off", "passive"); What I would like to do is to: in a section where I loop over the $flikar-array (to extract the names I would also like to get the value of the corresponding index in $typ. So when I get the value "Two" (which is $flikar[1]) I would also want to get the value "off" (which is $typ[1]) Restrictions to the solution: I can't use an associative array since I don't know the names that are going into $flikar until runtime (in some cases theese values will be a range of dates taken from a databse-tables start_date-value and end_date-value) Ok, enough is enough, if you don't get me ask me to clarify. thanks, tomas

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