The examples in this article describe how PHP implements the week-by-time timestamp. Share to everyone for your reference, as follows:
Gets the number of weeks of a timestamp, and the number of weeks after the next few days
which
$time Representative Time
$i start today.
The sample 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 readers interested in PHP related content can view the topic: "PHP Date and Time usage summary", "PHP Object-oriented Programming tutorial", "PHP string (String) Usage Summary", "Php+mysql database operation Getting Started tutorial" and " A summary of common PHP database operation techniques
I hope this article is helpful to you in PHP programming.
The above describes the PHP implementation based on the time stamp to obtain the weeks of the method, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.