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