// populate the array $verse[1] = "In the beginning was the Word, and the Word was with God, and the Word was God"; $verse[2] = "He was with God in the beginning."; $verse[3] = "Through him all things were made; without him nothing was made that has been made."; $verse[4] = "In him was life, and that life was the light of all mankind."; $verse[5] = "The light shines in the darkness,and the darkness has not overcome it."; $verse[6] = "There was a man sent from God whose name was John."; $verse[7] = "He came as a witness to testify concerning that light, so that through him all might believe."; $verse[8] = "He himself was not the light; he came only as a witness to the light."; $verse[9] = "The true light that gives light to everyone was coming into the world."; $verse[10] = "He was in the world, and though the world was made through him, the world did not recognize him.";
// get a random number from 1 to 10 $i = rand(1, 10);
// print John and verse echo("<h1>John 1:$i</h1>"); echo("<h2>$verse[$i]</h2>"); ?>