$thehour = date("G");
if ($thehour < 10) $display = "Buona mattina ";
elseif ($thehour < 13) $display = "Buon giorno ";
elseif ($thehour < 17) $display = "Buon pomeriggio ";
elseif ($thehour < 20) $display = "Buona sera ";
else $display = "Buona notte ";
echo $display.$username;