Afficher un message
Vieux 18/09/2007, 12h41   #3
David TG
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: slicing a complex array

gosha, et al --

gosha bine wrote:
> On 18.09.2007 06:29 David TG wrote:
> >
> > I would like to take a partial slice of a fairly complex array. The
> > source looks something like

....
> > Is there an easy way to do this across my entire source array without
> > just looping over it myself?

>
> There's apparently no built-in function that can handle this. If, for
> some reason, you're unhappy with "foreach", you can try array_map() or


Ahhhh... Those both sound familiar; I'll check 'em out.


> array_walk(). The modern OO approach would be to use an iterator,
> perhaps even different ones for different purposes.

[snip]

Oho! Thanks; I'll have to play with that.


>

....
> >
> > P.S. -- This is my first post-by-google, so I'm interested in seeing
> > how the formatting comes out. Wish me luck :-)

....
>
> The formatting is ok, but you should add a space after "--".


Heh. That's a web form for you. It was there originally :-/

I also noticed lots of extra linefeeds in my post. I'm not sure
whether I like 'em or not, as wrapping lines is a good thing but not
doing it where I want gets on my nerves.


Thanks again & HAND

:-D
--
David T-G

  Réponse avec citation
 
Page generated in 0,04850 seconds with 9 queries