$array_day = array('Ahad','Isnin','Selasa','Rabu','Khamis', 'Jumaat','Sabtu');
$array_month = array('','Januari','Februari','Mac','April','Mei','Jun','Julai', 'Ogos','September','Oktober','November','Disember');
//utk dapatkan hari mula dan tamat utk persidangan dewan rakyat
$bilhari=0;
$sql23 = "SELECT UNIX_TIMESTAMP(conference_date) AS unxdate, conference_day
FROM ipms_takwim_conference
WHERE takwim_id='".$rowTakwim[takwim_id]."' ORDER BY conference_day ASC";
$result23 = mysql_query($sql23) or die ('Error! '.mysql_error());
while ( $row23 = mysql_fetch_array($result23) )
{
$arrbilhari[$bilhari] = $row23['unxdate'];
$bilhari++;
}
Tarikh-tarikh Mesyuarat Dewan Rakyat adalah mulai dari hari
echo $array_day[date('w',$arrbilhari[0])].', '.date('d',$arrbilhari[0]).' '.$array_month[date('n',$arrbilhari[0])].', '.date('Y',$arrbilhari[0]); ?>
hingga hari echo $array_day[date('w',$arrbilhari[$bilhari-1])].', '.date('d',$arrbilhari[$bilhari-1]).' '.$array_month[date('n',$arrbilhari[$bilhari-1])].', '.date('Y',$arrbilhari[$bilhari-1]); ?>
selama echo $bilhari ?> hari.
?>
Hasil:
Tarikh-tarikh Mesyuarat Dewan Rakyat adalah mulai dari hari Isnin, 21 Ogos, 2006 hingga hari Rabu, 13 Disember, 2006 selama 43 hari.
http://my2.php.net/manual/en/function.date.php
ayus dan syuhada
nursyuhada.com
PHP: Paparan Tarikh Dalam "Bahasa"
Tuesday, August 01, 2006
Posted by ayus at 1:55 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment