Posted by Jerry Stuckle on 04/11/07 22:53
Steve wrote:
> someone asked a question in alt.php about a problem they were having with an
> algorytm. it contained something to the effect of:
>
> $i = $i++;
>
> some example code they'd snatched somewhere. in a loop, the expected $i to
> increment. i explained why i thought it would not - as it does not. however,
> i want to make sure i gave a valid answer.
>
> anyone have input?
>
>
$i is incremented. Then $i is set with the old (pre-increment) value of
$i (++ has precedence over =).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|