|
Posted by Jerry Stuckle on 04/12/07 12:44
Vince Morgan wrote:
> "Toby A Inkster" <usenet200703@tobyinkster.co.uk> wrote in message
> news:gr81f4-4kp.ln1@ophelia.g5n.co.uk...
>> Tamagafk wrote:
>>
>>> Hi! Looks like there is a bug in php. If I have function which uses
>>> foreach to run trough array recursively, the lop-level foreach
>>> interupted by lover-level foreach'es. If I use simply 'for' everything
>>> is ok.
>> It's not a bug -- it's a "feature". Internally, arrays in PHP have a
>> "pointer" (not in the C sense of the word) which points at the "current"
>
> Why not in the "C sense"?
> Something similar to an itterator in C++ ?
>
> TIA
> Vince
>
>
Vince,
Because in C a pointer is a memory location. It's not in PHP - just an
indicator to the current location in an array.
And no, it's not like an iterator - there are no methods you can use on
the internal pointer - only the array itself.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|