Re: Newbie question

From: Date: Sun, 14 Jul 2002 02:05:29 +0000
Subject: Re: Newbie question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107561@lists.php.net to get a copy of this message
Привет! 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; executing 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.......

« previous php.general (#107561) next »