Looping Addition
| From: | Stephen | Date: | Wed, 04 Dec 2002 21:26:57 +0000 |
| Subject: | Looping Addition | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-127039@lists.php.net to get a copy of this message | ||
Sorry for the uncontrolable emaling to the list but I'm in rather a stump.
You may be hearing a lot from me over the next few days too.
Anyway, I mentioned before my form with the addition that loops to the
number of numbers the user wants to add. Now to the part of the actual
addition, how could I loop that out also?
Here's what I'm trying to do right now but naturally, it doesn't work:
$output = 0;
$current = 1;
do
{
$output .= $num.$current +
$current++;
} while($current <= $_POST['vars']);
Any help would be great! Thanks!
Thanks,
Stephen Craton
http://www.melchior.us
"What is a dreamer that cannot persevere?" -- http://www.melchior.us