Google is useful, but if that would be used all the time, there wouldn't be any use of a forum, right?
That said, you'd need to do two things: randomize it, and actually insert input every time. A good way to do that would be to use an array. For randomizing, we'll use rand(). Let's assume you want five text bits randomized. We'll need to define both the minimum, and maximum as parameters for rand().
PHP Code:
<?php $randRotate = rand(0,4);
$text[0] = 'Your text 1'; $text[1] = 'Your text 2'; $text[2] = 'Your text 3'; $text[3] = 'Your text 4'; $text[4] = 'Your text 5'; ?>
You'll want to echo it as output on your page. Put it between PHP tags where you want it exactly. Make sure that the extension is .php.
PHP Code:
<?php echo($text[$randRotate]); ?>
__________________
$gocore = new gakoyucore();
$con = mysql_connect($gocore->server, $gocore->username, $gocore->password) or die(mysql_error());
|