codice:<?php $giorno = date("d",time()); $mese = date("m",time()); $frase1 = "Oggi è il compleanno di:"; $frase2 = "Tanti Auguri :-) !"; $immagine = "<img src=\"img/torta-trans.png\" alt=\"Torta\" />"; $date=array( "persona1"=>array("giorno"=>27,"mese"=>2), "persona2"=>array("giorno"=>11,"mese"=>5), "persona3"=>array("giorno"=>23,"mese"=>2), ); $output=""; foreach($date as $nome=>$compleanno){ if ($compleanno['mese'] == $mese && $compleanno['giorno'] == $giorno) $output.="<p class=\"margine5\">$frase1 <span style=\"color: #dd0000;\">$nome</span> $frase2 $immagine</p>"; } $output=$output == "" ? "<p class=\"margine5\">Oggi non ci sono compleanni!</p>" : $output; echo $output; ?>![]()