Cal Evans wrote:
> ++ is an incrementor. 

He may also consider the position of the inc/decrementor.
Example (note that the first element of an array has index 0):

$a = Array(1,2,3,4,5);
$i = 1;


echo $a[++$i]
will output
3 2

echo $a[$i++]
will output
2 2

In both cases $i gets incremented, but the value used to access the 
array might be before or after the increment takes place, according to 
the incrementor (or decrementor, if you use --) position. A subtle, but 
often very handy nuance.



LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is.......

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

Reply via email to