RE: [PHP] Anonymous Arrays

From: Date: Fri, 09 Mar 2001 16:09:25 +0000
Subject: RE: [PHP] Anonymous Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-43162@lists.php.net to get a copy of this message
> 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 (#43162) next »