I want to populate an array with post titles and change the title of the post (which is a draft) to a random member of the array of titles. Something like this?
function set_random_title ($title)
{
$title1[0] = "a title";
$title1[1] = "another title";
/*and so on*/
$randomize = rand(0,1);
return ($title1[$randomize]);
}
add_filter('the_title', 'set_random_title', 10, 2);