$title[0] = "beginners php"; $title[1] = "random title example"; $title[2] = "quite neat i suppose"; $title[3] = "useful , probably not"; $title[4] = "oh well"; // get a random number $randomize = rand(0, 4); echo ($title[$randomize]); ?>