Re: Looping Addition
| From: | Jason Wong | Date: | Thu, 05 Dec 2002 15:24:07 +0000 |
| Subject: | Re: Looping Addition | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127155@lists.php.net to get a copy of this message | ||
On Thursday 05 December 2002 23:05, Stephen wrote:
> So would I just put this?
>
> foreach(%_POST['number'] as $num)
> {
> $output *= $num;
> }
> echo $output;
>
> That's for multiplication.
Yes. Wouldn't it have been quicker for you to try it than to ask?
BTW make sure that none of $num is zero.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
The longest part of the journey is said to be the passing of the gate.
-- Marcus Terentius Varro
*/