IT/ITX suggestion
| From: | Steen Rabøl | Date: | Wed, 06 Feb 2002 14:51:18 +0000 |
| Subject: | IT/ITX suggestion | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-775@lists.php.net to get a copy of this message | ||
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