Re: modify array data

From: Date: Tue, 26 Apr 2005 14:49:45 +0000
Subject: Re: modify array data
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-213924@lists.php.net to get a copy of this message
I am wanting to rotate the array 45 degrees. "Richard Lynch" <ceo@l-i-e.com> wrote in message news:4409.24.148.18.109.1114201432.squirrel@www.l-i-e.com... > On Fri, April 22, 2005 8:46 am, Jon Aston said: > > Is there a way to easily rotate array data? > > > > what I want to do is > > change from > > > > bob | bill | frank > > joe | jose | sam > > sally | jim | kim > > > > to > > | | | frank| | | > > | |bill | | sam| | > > |bob| | jose | | kim| > > | |joe| |jim | | > > | | | sally | | | > > > > is there an easy way to do this? > > the data and arraysize will vary so I was looking for a way that I could > > have php do it without having to make script for different array sizes. > > http://php.net/array > > Look at array_pop and array_push and count and array_slice and > array_splice and array_shift. > > I really don't understand your BEFORE/AFTER diagrams at all, since it > pretty much looks random to me... In which case you want > http://php.net/shuffle > > -- > Like Music? > http://l-i-e.com/artists.htm

« previous php.general (#213924) next »