Re: For Loops !
| From: | TomHenry | Date: | Mon, 31 Jul 2000 20:38:27 +0000 |
| Subject: | Re: For Loops ! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9272@lists.php.net to get a copy of this message | ||
I think of it this way
for ($var=0;$var<10;$var++) { //some code stuff here }
is shorthand for
$var=0;
if($var<10){
//some code stuff here
$var++;
}
HTH,
TomH
At 03:08 AM 8/1/00 +1000, Matt wrote:
Hello mailing list ! :) Although I have been programming for quite some time now I never really understood for loops even though I use them in almost every script. It has a strange little pattern and I always thought it had another meaning, is this true or is that just how a for loop is structured ? for ($var=0;$var<10;$var++) { } Why does it use semi colons rather than commas ? Is for some kind of function with those three params ? Hmm ... it's probably just me at 3am :) Regards, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net--------------------------------------------------------------------
Strategic Business Systems (978) 745-2332
http://BusinessWebs.com/
--------------------------------------------------------------------