You'd need the second function to accept and argument.  That way you can do:
function boo() {
   $foo = 3;
   return $foo;
 }

function ahh($foo) {
   $fum = $foo + $fi;

 }
$test = boo();
ahh($test);

Or you could declare $foo as a global variable, but I tend not to do it that
way.
--
phill
> Hey All,
>
> I'm feeling pretty dumb right now. Is there a way to pass a variable from
> one function to another. So for instance, if I have one function that
> returns x such as
>
> function boo() {
>
>   $foo = 3;
>   return $foo;
>
> }
>
> And then I have another function and I want to use $foo.
>
> function ahh() {
>
>   $foo;
>   $fum = $foo + $fi;
>
> }
>
> I'm missing something but any help would be nice. Thanks.
>
> -Flint
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to