RE: Random value from ini file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I have an ini file that has:
> 1 = "words";
> 2 = "words1";
> 3 = "words3";
> 
> I want to pull a rand value and print it out
> I'm trying to use parse_ini_file but its not working any help would  
> be great.
> Thanks


You could read them all into an array then use array_rand() to pick one.

http://us2.php.net/manual/en/function.array-rand.php

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux