Codice PHP:
$query = "SELECT * FROM chat_giardini ORDER BY 'ID' DESC Limit 0,15"; $result = mysql_query($query, $db);
while ($row = mysql_fetch_array($result)) {
//
$lettera_iniziale=substr($row['Testo'], 0, 1);
if ($lettera_iniziale=="+") {
$row['Testo']="<font color='orange'>".substr($row['Testo'], 1)."</font>";
} else {
$row['Testo']=substr($row['Testo'], 1);
}
//
echo"<table><tr><td><font size='2'>$row[Ora]</font></td><td>[b]$row[Nick]<img src=/img/$row[Simbolo] width=20 height=20 border='no'>:[/b]</td><td>$row[Testo]</td></tr>";
}