note 14179 deleted from function.eval by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 23:25:20 +0000 |
| Subject: | note 14179 deleted from function.eval by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22325@lists.php.net to get a copy of this message | ||
I was wondering if I sould do something lie this
<?
$arr = ('myFoo' => 'crazy', 'myBar' => 'nutz');
$this_foo = new Foo($arr);
class Foo {
var $myFoo;
var $myBar;
function Foo($some_arr) {
foreach($some_arr as $k => $v) {
if ($v)
$this->$k = $v;
}
}
}
?>
I will know the answer soon because I am going to test, but I thought that if eval is needed this
would be a good question.