foreach/assign conflict? dropping last value

From: Date: Tue, 15 Oct 2002 04:02:43 +0000
Subject: foreach/assign conflict? dropping last value
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6139@lists.php.net to get a copy of this message
ok this is a weird one ... what I'm doing is taking a HTTP_POST_VARS and looping through them, setting them as hidden form fields and then setting them as variables: {foreach key=key item=item from=$post_vars} {assign var="order_$key" value="$item"} <input type="hidden" name="{$key}" value="{$item}"> {* FORM *} {/foreach} Now here's the weird part .. all of the input/hidden fields show up, but not the assigned variables. The last one drops off and isn't available. if I add in another: {assign var="order_$key" value="$item"} after the input, it works. Martin Kjeldsen seem to have a similar problem: http://marc.theaimsgroup.com/?l=smarty-general&m=101786148311641&w=2 but there was no resolution there... any ideas? -- Best regards, guido mailto:sguido@rogers.com

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