note 48314 rejected from control-structures.for by betz
| From: | betz@php.net | Date: | Sun, 19 Dec 2004 00:42:14 +0000 |
| Subject: | note 48314 rejected from control-structures.for by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82005@lists.php.net to get a copy of this message | ||
Note Submitter: marcel dot a dot n at bol dot com dot br
----
I'm tring to find a way to completee a list of numbers with "0", but I cant do this.
Let me show:
http://www.php.net/image07.jpg
http://www.php.net/image08.jpg
http://www.php.net/image09.jpg
http://www.php.net/image10.jpg
http://www.php.net/image11.jpg
http://www.php.net/image12.jpg
http://www.php.net/image13.jpg
In that case I used:
for( $ct1=1 ; $ct1 <= $_POST['variavel1'] ; $ct1++ ) {
if ( isset($_POST['zero1']) )
if ( $ct1 < 10 ) {
$zero1 = "0";
} else {
$zero1 = "";
}
This way it completes with "0" when the number > 99. I'm tring to find a way to
complete set the numbers for 5 cases and it be autocompleted with zeros. Like:
Number of cases: 5
Count until: 2000
0001
0002
...
0010
0011
...
0100
0101
....
1000
1002
...
2000
Does anyone have any idea?