The example in this article describes how the PHP implementation obtains the week-by time stamp. Share to everyone for your reference, specific as follows:
Gets the week of a time stamp, and how many weeks after the next few days
which
$time Representative Time
$i start today.
The specific example code is as follows:
function Gettimeweek ($time, $i = 0) {
$weekarray = array ("One", "two", "three", "four", "five", "six", "Day");
$oneD = * * *;
Return "Week". $weekarray [Date ("W", $time + $oneD * $i)];
}
$time =time ();
echo Gettimeweek ($TIEM);
More interested in PHP related content readers can view the site topics: "PHP date and Time usage summary", "PHP object-oriented Programming Introduction Tutorial", "PHP string (String) Usage Summary", "Php+mysql Database Operation Introduction" and " A summary of common PHP database operations tips
I hope this article will help you with the PHP program design.