RE: [PHP] Random value from ini file

From: Date: Tue, 28 Mar 2006 20:25:54 +0000
Subject: RE: [PHP] Random value from ini file
Groups: php.general 
Request: Send a blank email to php-general+get-232769@lists.php.net to get a copy of this message
> 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

« previous php.general (#232769) next »