Fungsi get_date

Digunakan untuk menghasilkan waktu dengan keluaran bertipe array.Sintaksnya adalah :

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>

<body>
<font face=verdana size=2>
<?
echo “<hr>”;
echo “sekarang jam:”,date(‘h:i:s A’);
echo “<hr>”;
$jam=getdate();
echo “selamat <b><u>”;
if($jam[hours]<=9)
echo “pagi”;
else
if($jam[hours]<=14)
echo “siang”;
else
if($jam[hours]<=19)
echo “sore”;
else
echo “malam”;
echo “</b></u> Mr.Ucup”;
?>
</font>
</body>
</html>

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s


Ikuti

Get every new post delivered to your Inbox.