= " . DataInizio . " AND CURRENT_TIMESTAMP() <= " . DataFIne . " ORDER BY id DESC LIMIT 1"; $result = mysqli_query($connection, $query); $number=mysqli_num_rows($result); $i = 0; if ($number < 1) { }else{ if($number > $i) { while ($row = mysqli_fetch_array($result)){ $All= $row['allerta']; $tip= $row['TipoAllerta']; $OI= $row['OraInizio']; $Of= $row['OraFine']; $DI= date("d-m-Y", strtotime($row['DataInizio'])); $DF= date("d-m-Y", strtotime($row['DataFIne'])); $ICP= $row['IcoPreci']; $ICT= $row['IcoTemp']; $ICV= $row['IcoVento']; $ICM= $row['IcoMare']; $ICN= $row['IcoNeve']; $ICC= $row['IcoCaldo']; $ICF= $row['IcoFreddo']; $TPR= $row['tiporischio']; $NAVV= $row['NumAvviso']; } $i++; } } ?> if ($number < 1) {?> }else{?> if($All=='Verde' OR $All=='verde'){?> }?> if($All=='Giallo' OR All=='giallo'){?> };?> if($All=='Arancione' OR $All=='arancione'){?> };?> if($All=='Rosso' OR $All=='rosso'){?> };?> };?> [my_elementor_php_output]