Reply to Re: [PHP] modify array data

Your name:

Reply:


Posted by Richard Lynch on 04/22/05 23:23

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация