RE: Returning variable and array from function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there!

Aha, ok thanx! :-)

Best regards
/Gustav Wiberg
 

-----Original Message-----
From: Stut [mailto:stuttle@xxxxxxxxx] 
Sent: Tuesday, June 12, 2007 12:17 PM
To: Gustav Wiberg
Cc: 'php windows' (php-windows@xxxxxxxxxxxxx)
Subject: Re:  Returning variable and array from function

Gustav Wiberg wrote:
> I think I have done this before but I can't remember how I did...
>  
> I want to return one variable ($htmlReport) and one array from a function
>  
> I'd like to like this:
> 
> return $htmlReport, $res;
> 
> but get the error: Parse error: syntax error, unexpected ',' in C:\www\test\timeweb\classes\reports.php on line 2745

Yeah, that's not valid PHP. Return it as as array...

return array($htmlReport, $res);

-Stut

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux