RE: [PHP] Anonymous Arrays

From: Date: Fri, 09 Mar 2001 16:17:30 +0000
Subject: RE: [PHP] Anonymous Arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43165@lists.php.net to get a copy of this message
yep that works, Initially I was getting an error when I did that but my function had been setup for a pass-by-ref. thanks morgan At 10:09 AM 3/9/2001 -0600, Boget, Chris wrote:
To make it a little cleaner I would prefer to do something like: my_func( {
       'fname' => 'joe'
      , 'lname'=>'coder'
      , 'zip'=>'12345'
} ); an not pollute the code with one-time vars Unless I'm misunderstanding what you are asking, you can do this: my_func( array( 'fname' => 'joe', 'lname'=>'coder', 'zip'=>'12345' )) { Chris


« previous php.general (#43165) next »