You are here: Re: random selection of CSV's « PHP Programming Language « IT news, forums, messages
Re: random selection of CSV's

Posted by noone on 02/23/06 20:19

monomaniac21 wrote:
> Hi all!
>
> Is there a function in PHP-MySQL to randomly select comma-seperated
> variables in a text field?
>
> For example if you have a text field containing the values
> "1,1.2,4,5.6," is there a way of randomly selecting one of the numbers?
>
> Any ideas would be greatly appreciated!
>

$selected = $arrayvar[ rand(0,array_count_values($record)-1) ]
get a random element within the array

not tested - YMMV.

 

Navigation:

[Reply to this 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

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