Jump to content
php.lv forumi

Recommended Posts

Posted

  foreach ($server_list as $server)
 {
  $misc   = lgsl_server_misc($server);
$server = lgsl_server_html($server);

$alldata = mysql_query("SELECT * FROM serveri ORDER BY id ASC");
$col = 0;


while ( $row = mysql_fetch_array($alldata ) )
{
$col++;
if ( $col % 2 == 0 )
{
 $color = 'FFFFEE';
}
else
{
 $color = 'EEFFFF';
}



echo "
<tr bgcolor='#".$color."'>
<td><a href='#servera_info' title='{$misc['text_status']} | {$misc['text_type_game']}'>{$server['b']['ip']}:{$server['b']['c_port']}</a></td>
<td>{$misc['name_filtered']}</td>
<td>{$server['s']['map']}</td>
<td>{$server['s']['players']} / {$server['s']['playersmax']}</td>
</tr>";
 }
 }

 

 

Kā varētu viņus apvienot, lai visu neizvadītu divas reizes?

Posted

Ko tavā uztverē nozīmē apvienot?

Bet izskatās, ka tu pie katra masīva elementa selektē visu no datubāzes pa jaunu (tb visu laiku vienu un to pašu).

×
×
  • Create New...