View Single Post
Old 01-26-2022, 07:57 PM  
NoWhErE
Too lazy to set a custom title
 
NoWhErE's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Canada
Posts: 10,333
you'd have to save all the names as an array. I don't know if your data is available in that format, but if it is, all you need to do is $random_title = array_rand($your_array_of_names) and it will output a random result every time.

if your data isn't an array yet, you can create one by adding each name in your database like this

step 1: create an empty array
$array = array();

step 2: go through each name in your db and add it to the array
foreach($row as $name) {
$array[] = $name;
}

now your array is ready to be randomized.
__________________
skype: lordofthecameltoe
NoWhErE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote