RE: [PHP] Newbie question

From: Date: Sun, 14 Jul 2002 01:37:24 +0000
Subject: RE: [PHP] Newbie question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107554@lists.php.net to get a copy of this message
++ is an incrementor. $i=1; $i++; echo $i; =C= p.s. -- is a decrementor. * * Cal Evans * The Virtual CIO * http://www.calevans.com * -----Original Message----- From: Jay [mailto:jay@nixit.ca] Sent: Saturday, July 13, 2002 8:32 PM To: php-general@lists.php.net Subject: [PHP] Newbie question I have just started to teach myself php so I am reading through several scripts to see how the language is "spoken". I came across the following at phpworld.com $i = 1; while ($i <= 10) { print $i++ Its a little script that counts from 1 to 10, but what does $i++ mean. What does the ++ do? Why ++ and not just one + Thanks -Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#107554) next »