so try something like this

for ($i = 5; $i < 6; $i += .1)
{
  echo number_format($i, 1) . ", ";
}

-----Original Message-----
From: Devin Atencio [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 10:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Incrementing number by .1 or substracting .1



Dear PHP Users,

I am trying to figure out how to write a script to increase
a number by .1 or decrease a number by .1 but the number needs
to be in the syntax of x.x. For instance the counting of 5.0 to
6.0 would go:

5.1,5.2,5.3,5.4,5.5,5.6,5.7,5.8,5.9,6.0

or vise versa for subtract. How could I do this? Any help would
greatly be appreciated.

Devin Atencio


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to