forse è colpa dell'if in cui l'ho inserito ma sembra corretto:
Codice PHP:
$query = "select * from news ORDER BY id DESC ";}
$result = mysql_query($query, $db_1);
while ($rigo = mysql_fetch_array($result))
{
$id = $rigo ["id"];
$autore = $rigo ["autore"];
$oggetto = $rigo ["oggetto"];
$data = $rigo ["data"];
?>
<tr>
<td width="43%" class="teston">[url="read.php?id=<?echo $id?>"]<?echo substr($oggetto, 0, 24); ?>[/url]</td>
<td width="33%" class="teston"><?echo substr($autore, 0, 21); ?></td>
<td width="17%" class="teston"><?echo substr($data, 0, 8); ?></td>
<td width="6%" class="teston"> <?php
function has_empty_element($v, $w) {
return $v || ($w == '');
}
$array = array();
$array ['imm1'] = '';
$array ['imm2'] = '';
$array ['imm3'] = '';
$has_empty_element = array_reduce($array, 'has_empty_element', false);
if ($has_empty_element) {
echo('NO');
} else {
echo('SI');
}
?>
</td>
<?
}
?>