echo testfunction($var1, $var2, $var3, $var4);

Or if you need to do something else with the value before echo()ing it:

$meat = testfunction($var1, $var2, $var3, $var4);
//Do something with $meat

Beauford 2002 wrote:

Hi,

I have form that a user would input information and that info is sent to
a function, but I need to be able to return a result of this function
and is where I am having a problem.
For example:

testfunction($var1, $var2, $var3, $var4); //the form fills these
values.

echo $meat;

function testfunction($a, $b, $c, $d) {

The $meat of the function goes here;

Now I need to return the result of $meat;

return $meat;
}

This does not work. I'm new to funtions and obviously missing something,
but I haven't been able to find a good tutorial on this. The PHP manual
isn't much help.

Any help is appreciated.




--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




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

Reply via email to