Re: assigning

From: Date: Sat, 03 Mar 2001 15:46:17 +0000
Subject: Re: assigning
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-281@lists.php.net to get a copy of this message
Be my guest :-) I don't think there is a need to do a loop though, you could just do this: $smarty->assign(get_defined_vars()); This would never be done by default in Smarty, it is much too impractical. Maciek Uhlig wrote: > > What do you think about the following idea: > > $variables = get_defined_vars(); > while (list ($key, $val) = each ($variables)) > > $smarty->assign($key, $val); > } > > Is something like that reasonable at all in order to not think about > assigning? Before I even try I'd like to hear your opinion... > > Maciek > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

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