date format functino php
<?php
echo date("F j, Y, g:i a")."<br>"; // March 10, 2001, 5:16 pm
echo date("m.d.y")."<br>"; // 03.10.01
echo date("j, n, Y")."<br>"; // 10, 3, 2001
echo date("Ymd")."<br>"; // 20010310
echo date('h-i-s, j-m-y, it is w Day')."<br>"; // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
echo date('\i\t \i\s \t\h\e jS \d\a\y.')."<br>"; // it is the 10th day.
echo date("D M j G:i:s T Y")."<br>"; // Sat Mar 10 17:16:18 MST 2001
echo date('H:m:s \m \i\s\ \m\o\n\t\h')."<br>"; // 17:03:18 m is month
echo date("H:i:s")."<br>"; // 17:16:18
echo date("Y-m-d H:i:s")."<br>"; // 2001-03-10 17:16:18 (the MySQL DATETIME format)
$date_string_prepared = date_create("2020-08-07");
$date_string = $date_string_prepared->format("d M Y");
// result 07 Jul 2020
Also in PHP:
- Your Composer dependencies require a PHP version ">= 7.2.5". You are running 7.2.0. in
- erreur php
- exception class list for all server error in laravel
- How to check beautify json result using php
- api header php
- cache clear in laravel live server
- composer require guzzlehttp/guzzle
- 500 server error in laravel
- convert image to base64 php
- equivalent console.log in php
- check index array php
- @ development: `mix` npm ERR! Exit status 1
- console data from php to jquery console
- clear cache routes laravel
- 0 == "string" php
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, string given in
- apt install php7.4-mbstring php7.4-zip php7.4-xml
- all files in a folder to array php
- Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes laravel string length 1000
- <?php echo do_shortcode(' '); ?> with variable
- codeigniter 3 insert
- create project laravel
- check if string contains letter php
- "\" strpos