Membuat Fungsi Hari Indonesia

Share On :
<?php
function hari()
{
$hari2=date("w");
Switch ($hari2){
case 0 : $hari="Ahad";
Break;
case 1 : $hari="Senin";
Break;
case 2 : $hari="Selasa";
Break;
case 3 : $hari="Rabu";
Break;
case 4 : $hari="Kamis";
Break;
case 5 : $hari="Jumat";
Break;
case 6 : $hari="Sabtu";
Break;
}
return $hari;
}


Untuk menjalankan fungsi hari gunakan

<?php echo hari();?>


0 komentar:

Post a Comment

  • Mahasiswa STMIK Duta Bangsa
  • description
  • description
  • description
  • description
  • description
  • description
  • description

Free Hosting

Free Hosting

My Blog List

A
B
C
     
D
E
F
DuGMp3    
G
H
I
Goo Otomotif HouseofScript  
J
K
L
Java Hotline    
M
N
O

My Games Collection

MeLangKah LeBih MaJu

   
P
Q
R
Pamella Decoration    
S
T
U
Studied WaLL    
V
W
X
     
Y
Z
0-9
     









Join....!


Free Domain

Free Domain

SiNyO. Powered by Blogger.