Home  >  Article  >  Backend Development  >  How to output the day of the week in php

How to output the day of the week in php

藏色散人
藏色散人Original
2020-09-11 09:51:044203browse

How to output the day of the week in php: First create a PHP sample file; then output the current time through the code statement [$s = date('w');echo 'Today is the week:'.$s;] Just the day of the week.

How to output the day of the week in php

Recommendation: "PHP Video Tutorial"

Use PHP to output the period of the current time and express it with numbers

PHP Enter the day of the week code

<?php
//飞鸟慕鱼博客
$s = date(&#39;w&#39;);
echo &#39;今天是周:&#39;.$s;
?>

How to output the day of the week in php

PHP gets the Chinese day of the week, PHP gets the day of the week code, PHP gets the day of the week for the specified date, PHP gets the day of the week A few codes

Code running results

Today is week: 3

The above is the detailed content of How to output the day of the week in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn