On 24/07/07, Chris Mika [EMAIL PROTECTED] wrote:
I don't know if I'm doing something wrong or if this is a bug.
Very simply: I created an array with values 1-5. I use a foreach loop to
iterate over it to add 1 to the values. It correctly iterates over the
array except for the last value.
Code:
I don't know if I'm doing something wrong or if this is a bug.
Very simply: I created an array with values 1-5. I use a foreach loop to
iterate over it to add 1 to the values. It correctly iterates over the
array except for the last value.
Code:
?php
$test = array(1, 2, 3, 4, 5);
print
Chris Mika wrote:
I don't know if I'm doing something wrong or if this is a bug.
the problem is due ot reuse of the variable you define by reference in the
second loop - cant really explain why its doing what you see but IIRC its
not a bug, an artifact of the way references work. someone with a
3 matches
Mail list logo