Re: [PHP] Variable Argument List

2008-11-17 Thread Craige Leeder
Richard Heyes wrote: yup.. Warning: func_get_args(): Called from the global scope - no function context Doesn't the name of the function give you a clue as to its use? You need to call it inside a function. He was answering Nathan's question regarding what would happen IF you called

Re: [PHP] Variable Argument List

2008-11-17 Thread Robert Cummings
On Mon, 2008-11-17 at 11:54 -0500, Shiplu wrote: > On Fri, Nov 14, 2008 at 8:13 PM, Daniel Kolbo <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I am trying to do something like the following: > > > > > > > function hello($var1 = 'default1', $var2 = 'default2') { > > echo "$var1:$var2"; > > } > >

Re: [PHP] Variable Argument List

2008-11-17 Thread Richard Heyes
> yup.. > Warning: func_get_args(): Called from the global scope - no > function context Doesn't the name of the function give you a clue as to its use? You need to call it inside a function. -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated Nove

Re: [PHP] Variable Argument List

2008-11-17 Thread Shiplu
On Fri, Nov 14, 2008 at 8:13 PM, Daniel Kolbo <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to do something like the following: > > > function hello($var1 = 'default1', $var2 = 'default2') { > echo "$var1:$var2"; > } > > $func= "hello"; > $args = "'yo','bob'"; > $func($args); > > ?> > > I

Re: [PHP] Variable Argument List

2008-11-17 Thread Nathan Rixham
Richard Heyes wrote: ... And you might also be interested in func_get_args(), which returns an array of args passed to the function (don't know what it does if used outside a function. Probably get an error). yup.. Warning: func_get_args(): Called from the global scope - no function conte

Re: [PHP] Variable Argument List

2008-11-15 Thread Richard Heyes
> ... And you might also be interested in func_get_args(), which returns an array of args passed to the function (don't know what it does if used outside a function. Probably get an error). -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated November

Re: [PHP] Variable Argument List

2008-11-14 Thread Daniel Kolbo
Daniel Kolbo wrote: Hello, I am trying to do something like the following: I understand why this outputs: 'yo','bob':default2 However, I want it to output: yo:bob Is this possible? I tried using different combinations of {}, but I cannot seem to get it to happen. I need some kind of "pre

[PHP] Variable Argument List

2008-11-14 Thread Daniel Kolbo
Hello, I am trying to do something like the following: I understand why this outputs: 'yo','bob':default2 However, I want it to output: yo:bob Is this possible? I tried using different combinations of {}, but I cannot seem to get it to happen. I need some kind of "preprocessor" feature per