Membuat Tanggal Dengan PHP

Wahyu Raja Butar-Butar Reply 05:39

<?PHP
date_default_timezone_set("Asia/Jakarta");

//Array Hari
$array_hari = array(1=>"Senin","Selasa","Rab
u","Kamis","Jumat",
"Sabtu","Minggu");
$hari = $array_hari[date("N")];
//Format Tanggal
$tanggal = date ("j");

//Array Bulan
$array_bulan = array(1=>"Januari","Februari","Maret",
"April", "Mei",
"Juni","Juli","Agustus","September","Oktober",
"November","Desember");
$bulan = $array_bulan[date("n")];

//Format Tahun
$tahun = date("Y");
//Menampilkan hari dan tanggal
echo $hari . "," . $tanggal."-" . $bulan."-" . $tahun;
?>

Related Posts

PHP 8706208264501972458
Comments
0 Comments
Facebook Comments by Media Blogger

Post a Comment

Search

Google+ Followers

Popular Posts

Translate