My problem, simplified is:
class A {
public $a;
public $b;
function f1 () {
// Code
}
}
$obj = new A();
$arr = array ("a" => 1, "b" => 2);
How can I put the contents of $arr into $obj? (Obviously without $obj->a = $arr["a"], suppose there are thousands of values)
Thank you.