Re: note 11394 added to func_get_args
| From: | Jesus M. Castagnetto | Date: | Tue, 20 Feb 2001 04:09:28 +0000 |
| Subject: | Re: note 11394 added to func_get_args | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-11270@lists.php.net to get a copy of this message | ||
Not true, you did not read the manual, you get an
*array* of arguments, so your code is incorrect,
Try instead:
function testfct($i) {
print ($i[0][0].$i[0][1]);
}
suggest using print_r($i) too so you can see what the
function does.
Your note will be removed.
--- apere@agilitime.com wrote:
> There's no way to pass an array using this method
> either :
>
> the following code doesn't work :
> <?
> function testfct($i)
> {
> print ($i[0].$i[1]);
> }
>
> function go()
> {
> testfct(func_get_args());
> }
>
> $tab[0] = "hello ";
> $tab[1] = "world";
>
> go($tab);
> ?>
>
>
>
http://www.php.net/manual/en/function.func-get-args.php
>
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/