![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: $i++ problem understanding
From: Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca>
Date: Wed Oct 05 2005 - 21:37:04 CEST
Pugi! (pugi@group.thnx) wrote:
: I can understand the following :
: But much harder to accept is and I fail to see the logic in it,
: Can anyone help me understand this or see the logic in it ?
The logic in it is simply that the post-increment operator ($variable++)
If you want the variable to be incremented _before_ the value is printed
$i=10;
# the above prints 11, just like you wanted.
-- This programmer available for rent.Received on Tue Oct 18 02:32:24 2005 |