Getting data in and out of functions?

From: Date: Mon, 12 May 2003 14:48:28 +0000
Subject: Getting data in and out of functions?
Groups: php.general 
Request: Send a blank email to php-general+get-147307@lists.php.net to get a copy of this message
I'm really struggling with passing information both in to and out of functions. I've turned to using include() as a replacement to functions sometimes because I need to pass a lot of data in to a function, and get lots of data back out of it, and I can't seem to figure out the trick. I'm OK with using
     function errorcheck($val1, $val2, $val3) {
     # blahblahblah
     }
     errorcheck($val1, $val2, $val);
to get values into a function, but I need to do error checking and correction on those values, and return all that data plus controls (were there any errors in the data? if so, which ones?). Returning all that data back to the rest of the code is where I get lost. If anyone could help de-mystify this for me, I'd sure appreciate it. Thanks, -Derrick

« previous php.general (#147307) next »