Number of days of the week in a loop (the red letter shows the number of days of the week)
$ Week_array = array (1, 2, 3, 4, 5, 6, 7 );
Foreach ($ week_array as $ key => $ value)
{
If ($ value = date ("W "))
$ Value = "<font color =" red ">". $ value. "</font> ";
Echo
$ Value ."";
}
The number of days in the current month is output cyclically (the red letter shows the current number)
For ($ day = date ("T"); $ day> 0; $ day --)
$ Month_array [] = $ Day;
Sort ($ month_array );
Foreach ($ month_array
$ Key => $ value)
{
If ($ value = date ("J "))
$ Value = "<font
Color = "red"> ". $ value." </font> ";
Echo $ value ."";
} Echo
'Month of the current year :';
For ($ I = 1; $ I <= 12; $ I ++ ){
If ($ I = Date ('n') echo '<B
Style = "color: Red"> ';
Echo "$ I/t ";
If ($ I = Date ('n') echo
'</B> ';
}
Echo "<br/>/n days of the current month :";
For ($ I = 1; $ I <= Date ('T'); $ I ++ ){
If ($ I = Date ('J') echo '<B style = "color: Red"> ';
Echo "$ I/t ";
If ($ I = Date ('J') echo '</B> ';
}
Echo "<br/>/n days of the week :";
$ Arr = array ('day', 'yi', '2', '3', '4', '5', '6 ');
For ($ I = 0; $ I <6; $ I ++ ){
If ($ I = Date ('W') echo '<B style = "color: Red"> ';
Echo
$ Arr [$ I]. "/t ";
If ($ I = Date ('W') echo '</B> ';
}
Echo "<br
/>/N :";
For ($ I = 0; $ I <24; ++ $ I ){
If ($ I = Date ('G') echo '<B
Style = "color: Red"> ';
Echo "$ I/t ";
If ($ I = Date ('G') echo
'</B> ';
}