####################### ####################### /* This function counts the members of an array, creates a random number between zero and the index of the last member and uses it to pick a member at random. The result can be echoed, without quotes, in the HTML or assigned to a variable in the PHP */ function random_select($array) { $count = count($array)-1; $rand = rand(0, $count); $out = "$array[$rand]"; return $out; } ####################### ####################### # make an array of pics $Pic[] = "Lingo.jpg"; $Pic[] = "lighthouse.jpg"; $Pic[] = "purpleheart.jpg"; $Pic[] = "stormy.jpg"; $Pic[] = "skyline.jpg"; $Pic[] = "sailing.jpg"; $Pic[] = "nativity.jpg"; $Pic[] = "valentine.jpg"; $Pic[] = "castle.jpg"; $Pic[] = "organ.jpg"; $Pic[] = "runway.jpg"; $Pic[] = "singer.jpg"; $Pic[] = "stage.jpg"; ####################### ####################### # make array of transitions $transit[] = "slideup"; $transit[] = "slidedown"; $transit[] = "slideleft"; $transit[] = "slideright"; $transit[] = "wipeup"; $transit[] = "wipedown"; $transit[] = "wipeleft"; $transit[] = "wiperight"; $transit[] = "wipelefttop"; $transit[] = "wipeleftbottom"; $transit[] = "wiperighttop"; $transit[] = "wiperightbottom"; ####################### ?>
">| |