Thread: MySQL + Arrays?
View Single Post
  #8  
Old 09-30-2011, 07:32 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 395,424
Hall of Famer is on a distinguished road
Default

Well, change:

PHP Code:
$species $input[$rand_keys[0]]; 
To this then:

PHP Code:
$species $input[$rand_keys]; 
Remember array_rand() returns a string if the number is set to be 1, it returns an array if the number is greater than 1.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote