Hi every one,
Please i need to some data from my database to display at a random for certain time, then refresh with another set of data.
thanks, be
very greatfull.
Hi every one,
Please i need to some data from my database to display at a random for certain time, then refresh with another set of data.
thanks, be
very greatfull.
Here you go:
HTHPHP Code:<?php
$arr = array();
$q = mysql_query("SELECT * FROM mytable") or die(mysql_error());
while($r = mysql_fetch_array( $q )) {
array_push($arr, $r[myfieldvalue]);
}
shuffle($arr);
echo $arr[0];
?>![]()
- Josh
Bookmarks