Re: [PHP] foreach with methods returning arrays ??? any ideas ?

2002-08-17 Thread Ipa
o it knows where in the array it is. Since you keep > returning the same array, the array cursor is kept. > > -Rasmus > > On Sat, 17 Aug 2002, Ipa wrote: > > > Have a strange problem with methods.. > > > > if i use function to return some array and doing 2-level

[PHP] foreach with methods returning arrays ??? any ideas ?

2002-08-17 Thread Ipa
Have a strange problem with methods.. if i use function to return some array and doing 2-level nested foreach(), for example function x(){ return array(1, 2,3); } foreach(x() as $key){ echo $key .""; foreach(x() as $key2){ echo "  " . $key2 . ""; } } everything works fine ... the output i