Don't you need to set a return?

Return $blah;

At the bottom of your function block.



alex hogan


> -----Original Message-----
> From: Nathan Croker [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 07, 2004 6:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Variables inside a function
> 
> I am relatively new to PHP. But something I can't seem to make work is
> when
> I call one of the functions I have made and a variable is set inside that
> function....
> eg. function blah ($bl,$ah) {
> $bl++;
> $ah++;
> $blah=$bl+$ah;
> }
> I then echo $blah; somewhere else in the script but nothing is echo'd. How
> do I make it so that I can use $blah anywhere in the script?
> 
> Thank you in advance for any help.
> ------------------------
> Nathan Croker
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


****************************************************************** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
****************************************************************** 


Reply via email to