Re: default function argument issue
From: AJ (harryman100_at_hotmail.com)
Date: 03/22/04
- Next message: Pedro Graca: "Re: default function argument issue"
- Previous message: Brad Kent: "default function argument issue"
- In reply to: Brad Kent: "default function argument issue"
- Next in thread: Pedro Graca: "Re: default function argument issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Mar 2004 18:47:10 +0000 (UTC)
On 22 Mar 2004 10:39:39 -0800, Brad Kent <bkfake-google@yahoo.com> wrote:
> function test($foo=array()) {
> echo gettype($foo);
> implode(' ',$foo);
> }
>
> foo();
>
>
>
> This code will output:
> null
>
> and generate the error
> Bad arguments. in .... on line x ( bad implode args )
>
> what's the deal?
> $foo should be an array!
I guess its because $foo doesn't have anything in it, I think even if
something is an array, but only has one element in it, it will fail an
implode.
- Next message: Pedro Graca: "Re: default function argument issue"
- Previous message: Brad Kent: "default function argument issue"
- In reply to: Brad Kent: "default function argument issue"
- Next in thread: Pedro Graca: "Re: default function argument issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|