Repeat This...

From: Date: Wed, 11 Dec 2002 02:49:32 +0000
Subject: Repeat This...
Groups: php.general 
Request: Send a blank email to php-general+get-127752@lists.php.net to get a copy of this message
I said this earlier but this time I'm saying it differently because I semi-fixed it. I want to repeat the following code as many times as the user specifies in the variable $_POST['x']. I then need to have the output display as all the numbers found in the sequence. How would I do this? Code: $number = 1; $output = $num3; do { $output = $output * $r . ", "; $number++; } while($number < $_POST['x']); What this is supposed to do is find the next X numbers in a sequence with the common ratio (r) being the multiplier. After that, it puts it in a list, and tells the user the next X numbers in the sequence... Thanks, Stephen Craton http://www.melchior.us "What is a dreamer that cannot persevere?" -- http://www.melchior.us

« previous php.general (#127752) next »