method parameters
Posted: Mon Jun 18, 2007 11:38 pm
Hello people!
my problem is, i want to initialize a class with an array parameter.
$arr = array('param1', 'param2', 'param3');
i want this $arr to be passed in my class parameter orderly. like this
$myclass = new MyClass($arr); // it doesnt seem to work.
Here is the class:
class MyClass($param1, $param2, $param3)
{
}
thanks for the help!
my problem is, i want to initialize a class with an array parameter.
$arr = array('param1', 'param2', 'param3');
i want this $arr to be passed in my class parameter orderly. like this
$myclass = new MyClass($arr); // it doesnt seem to work.
Here is the class:
class MyClass($param1, $param2, $param3)
{
}
thanks for the help!