Re: docs request

From: Date: Sat, 10 Nov 2001 20:40:58 +0000
Subject: Re: docs request
References: 1 2 3 4 5  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969338635@lists.php.net to get a copy of this message
> >Isn't > > > > array_chunk($array, 2, TRUE); > > > >the same as > > > > array_slice($array, 0, 2); > > > >OK, it is not completely the same, as you > >cannot choose "do not preserve keys" while > >using array_slice(). Wouldn't it be better to > >extend array_slice() with another parameter, > >or something like that... > > > >These functions seem to me nearly the same > >(except of key preservation). > > No. array_chunk() will split the input array into several sub-arrays > depending on the chunk length you specify. Try using array_chunk(array('a', > 'b', 'c', 'd', 'e'), 2). OK, now I can see. Then I'll add the documentation for it. Goba

« previous php.doc (#969338635) next »