Ive seen posts like this before ( 'how do I pass arrays as arguments to
functions?' ) this is quite simple, nothing at all has to be done.

<?php

 class test
 {
  function test($array)
  {
   foreach($array as $pos => $val)
    echo "$pos : $val <br>\n";
  }
 }

 $arr[] = 'chris ';
 $arr[] = 'lee ';
 $arr[] = 'works for ';
 $arr[] = 'mediawaveonline.com ';

 $test = new test($arr);
?>

there's nothing to it.


--



Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]




"rodrigo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it possible to pass arrays as arguments to class methods? If so, how?
> What is the proper syntax and things to look out for.
>
> Thanks in advanced.
> --
> ************************************
> Ivan R. Quintero E.* (507)228-3477
> Aptdo 1263    * (507)228-9105
> Balboa, Ancon    * 640-0370
> Republic of Panama *
> ************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to