Re: IT/ITX suggestion
| From: | David Peter | Date: | Wed, 06 Feb 2002 15:04:57 +0000 |
| Subject: | Re: IT/ITX suggestion | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-777@lists.php.net to get a copy of this message | ||
"Steen rabøl" <steen.rabol@navision.com> schrieb im Newsbeitrag
news:425017B75A8DD511AABA00034708F4159FF3C6@nsw1_exch_srv4.navision.com...
> Hi
>
> How about adding a function like this to IT
>
> function setVariableArray($_var)
> {
> if(is_array($_var))
> {
> foreach($_var as $key => $value)
> $this->setVariable(${key},$value);
> }
> }
>
> Then you add a table record or another array quick without calling
> setVariable() several times
>
> I have used this several times but...
>
> class myIntegratedTemplateExtension extends IntegratedTemplateExtension
> {
> function setVariableArray($_var)
> {
> if(is_array($_var))
> {
> foreach($_var as $key => $value)
> $this->setVariable(${key},$value);
> }
> }
> }
>
>
> Best
> Steen
>
What is this ${key}for? Why not just using $key?
And why are you using $_var in the argumentlist? I think the argument is not
private.
David Peter
http://phpwelt.com davidpeter@web.de