++$i and $i++ whatz the difference?
| From: | Dhaval Desai | Date: | Wed, 28 Feb 2001 07:50:10 +0000 |
| Subject: | ++$i and $i++ whatz the difference? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41959@lists.php.net to get a copy of this message | ||
Hi!
I have a simple question. Please see the code below:
<?php
for($i=0; $i<=10; $i++)
{
echo "$i<br>";
}
?>
Now, See this code:
<?php
for($i=0; $i<=10; ++$i)
{
echo "$i<br>";
}
?>
I get the same out put from both the Scrits. What's
the difference then anywayz?
Thank You!
Dhaval Desai
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/