RE: [PHP] Getting data in and out of functions?
| From: | Don Read | Date: | Mon, 12 May 2003 19:49:32 +0000 |
| Subject: | RE: [PHP] Getting data in and out of functions? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147341@lists.php.net to get a copy of this message | ||
On 12-May-2003 Derrick Fogle wrote:
> 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.
>
http://www.php.net/manual/en/functions.arguments.php#functions.arguments.by-
reference
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.