Вы никогда не учились?
Все прекрастно работает, спасибо большое
<?php
mysql_connect($hostddd, $userdbddd, $passdbddd);
mysql_select_db($databaseddd);
$db1n = mysql_num_rows(mysql_query("SELECT * FROM writers"));
///////////////////////////////////////////
$rand=array();$temp_rand=NULL;
for($i=0;$i<$db1n;$i++)
{
while(in_array($temp_rand=rand(1,$db1n),$rand));
$rand[$i]=$temp_rand;
}
/////////////////////////////////////////////
$db1 = mysql_fetch_assoc(mysql_query("SELECT * FROM writers WHERE id='".$rand[0]."'"));
$wri = "<a href='index.php?option=com_content&view=article&id=48#".$db1['id']."'>
<img src='http://localhost/writers/".$db1['photo']."'></img></a>
<br>
<b>".$db1['name']."</b><br><span style='font-size: 11px'>Age: ".$db1['age']."</span>
<br><span style='font-size: 11px'>Country of Residence: ".$db1['country']."</span>
<br><span style='font-size: 11px'>Degree: ".$db1['degree']."</span><br><br>";
$db2 = mysql_fetch_assoc(mysql_query("SELECT * FROM writers WHERE id='".$rand[1]."'"));
$wri2 = "<a href='index.php?option=com_content&view=article&id=48#".$db2['id']."'>
<img src='http://localhost/writers/".$db2['photo']."'></img></a>
<br>
<b>".$db2['name']."</b><br><span style='font-size: 11px'>Age: ".$db2['age']."</span>
<br><span style='font-size: 11px'>Country of Residence: ".$db2['country']."</span>
<br><span style='font-size: 11px'>Degree: ".$db2['degree']."</span><br><br>";
$db3 = mysql_fetch_assoc(mysql_query("SELECT * FROM writers WHERE id='".$rand[2]."'"));
$wri3 = "<a href='index.php?option=com_content&view=article&id=48#".$db3['id']."'>
<img src='http://localhost/writers/".$db3['photo']."'></img></a>
<br>
<b>".$db3['name']."</b><br><span style='font-size: 11px'>Age: ".$db3['age']."</span>
<br><span style='font-size: 11px'>Country of Residence: ".$db3['country']."</span>
<br><span style='font-size: 11px'>Degree: ".$db3['degree']."</span><br><br>";
echo "<br>".$wri.$wri2.$wri3;
?>