note 14179 added to function.eval.php

From: Date: Fri, 20 Jul 2001 06:27:01 +0000
Subject: note 14179 added to function.eval.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15607@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. http://www.php.net/manual/en/function.eval.php

« previous php.notes (#15607) next »