Questo è il php che utilizzo... ma secondo me (parlo da ignorante) non è corretto per come voglio che li visualizzi.
Codice PHP:
mysql_connect($host,$user,$pass); #connessione al database
mysql_select_db($db); #selezionee al database
$tot = 5; # il numero di news da visualizzare
$i = 0; # variabile che servirà da indice (che incrementeremo)
$$query = "SELECT id,titolo,testo,DATE_FORMAT(data, '%d.%m.%Y') as newData
FROM news
ORDER by data desc
LIMIT 0,$tot";
$result = mysql_query($query);
$output = 'tot='.mysql_num_rows($result);
while($news = mysql_fetch_array($result))
{
$output .= '&data'.$i.'='.$news['newData'];
$output .='&titolo'.$i.'='.urlencode($news['titolo']);
$output .='&testo'.$i.'='.urlencode(substr($news['testo'],0,200));
$i++;
}
echo $output;
?>