I am having a problem with a while loop
if I put in a number with 0's in front of it it converts the number
two the first whole number. such as 00001 would be 1 02200 would be
2200. Then it starts the count down starting with that number.

How can I make it not remove the 0's in front of the number these are
needed to search a certain database .

The following script would look like this when run
00001
2
3
4
I needed it to look like this
00001
00002
00003

<?php
$startnumber="00001";
$stopnumber="02200";

$i = $startnumber;
echo $i;

while ($i <= $stopnumber):
echo "<br>" ;
echo $i;

++$i;
endwhile;
?> 

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

Reply via email to