Código PHP:
   $sql_mod="select nombre from top_imagenes_graficos where cod_menu='$cd_menu'";
    $res_mod=mysql_query($sql_mod);
    $numero_menus= mysql_num_rows($res_mod);
    $n_foto= rand(1,$numero_menus);
    $j=1;
    while ($dat_mod=mysql_fetch_array($res_mod)){        
        if($n_foto == $j){
            $bg_foto=$background.$dat_mod[0];        
            }
        $j++;
    } 
    Código PHP:
  
<td background="<?php echo $bg_foto ?>" valign="top"> </td>   Gracias de antemano...
 
 
