I'm going in circles at the moment.
Could use some help getting from here:
$result4 = @mysql_query($query4);
if ($result4) {
$count = 0;
$row4 = @mysql_fetch_array($result4, MYSQL_NUM);
Randomize $row4[0] and begin loop...
To here:
$count = $count + 1;
if ($count <= 4) {
$query1 = "SELECT first_name, last_name, city, state, thumb FROM users WHERE user_id='$user'";
$result1 = @mysql_query($query1);
if ($result1) {
$row1 = @mysql_fetch_array($result1, MYSQL_NUM);
$name = "$row1[0] $row1[1]";
$city = $row1[2];
$state = $row1[3];
$thumb = $row1[4];
echo "<tr valign=top><td width =40><a href=faculty_view.php?uid=$uid><img src=$thumb class=img1></a></td>
<td><a href=faculty_view.php?uid=$uid>$name</a><br>
$city, $state<br>
<a href=faculty_articles.php?uid=$uid>Articles</a> | <a href=faculty_message.php?uid=$uid>Contact</a></td></tr>";
}
} else {
break;
}
Any suggestions on how to use array_rand and write the loop would be much appreciated. Otherwise I will be back to grind this over tomorrow. I think I just dont have a good understanding of arrays, time to rtfm I know.