++ 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:[EMAIL PROTECTED]]
Sent: Saturday, July 13, 2002 8:32 PM
To: [EMAIL PROTECTED]
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



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

Reply via email to