CodeChargenewbie
Posts: 114
|
| Posted: 09/28/2007, 9:15 AM |
|
I have no idea how to sum up what I'm trying to say; so, sorry about the title
Here's the line of code in a function that I'm concerned about.
function test()
{
code...
global $var->something("Text " . $var2, $var3, $var4);
more code...
}
I got some t_object_operator error with the line, complaining about a comma or semicolon. Is said line possible?
See, instead of doing this:
function test()
{
global $var;
global $var2;
global $var3;
global $var4;
code...
$var->something("Text " . $var2, $var3, $var4);
more code...
}
I'd rather do the line in question and eliminate the overhead. I know, I could pass in the variables as arguments and such, but I was curious if the line above can work.
Thank you.
|