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'
> >
> 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( 'fna
Does PHP4 have anything similar to perl's anonymous hash or array( $var = {
'some' => 'hash elements' } or $var = [ 'array', 'elements' ] )
The reason I ask is I am trying to find a way of passing a variable length
list of named parameters to a function without having to use a specific order.
i
3 matches
Mail list logo