hello i want to shuffle an array with many
fields in it, but it won't work, if i have an
array with 1 field in it, it works.
i retrieve information from a mysql table,
but i want to put the information
in a random sequence, so that not everytime
the same information is on top.
here's my code :
how do i display the array at random ?$result = mysql_query("select * from inventory where groep='NIEUW' order by id1 DESC LIMIT 0, 50 ");
if ($myrow = mysql_fetch_array($result)) {
echo '<TABLE class="hoofd" cellspacing="2" cellpadding="0">';
kopregel("new CD's ");
$i=0;
//echo mysql_num_rows($result);
do {
if ($i/2 == floor($i/2)) {
beginrij();
cdgegevens($myrow["soort"],$myrow["artiest"],$myrow["titel"],$myrow["price"],$myrow["specprice"],$myrow["sufprefix"]);
}
else {
cdgegevens($myrow["soort"],$myrow["artiest"],$myrow["titel"],$myrow["price"],$myrow["specprice"],$myrow["sufprefix"]);
echo '</TR></TABLE></TD></TR>';
}
$i++;
} while ($myrow = mysql_fetch_array($result));
echo "n";
} else {
echo "Sorry, no records were found!";
}
i appreciate yours help
Jan the netherlands