date using php
$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
$today = date("m.d.y"); // 03.10.01
$today = date("j, n, Y"); // 10, 3, 2001
$today = date("Ymd"); // 20010310
$today = date('h-i-s, j-m-y, it is w Day'); // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day (10ème jour du mois).
$today = date("D M j G:i:s T Y"); // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s \m \e\s\t\ \l\e\ \m\o\i\s'); // 17:03:18 m est le mois
$today = date("H:i:s"); // 17:16:18
$today = date("Y-m-d H:i:s"); // 2001-03-10 17:16:18 (le format DATETIME de MySQL)FYI: there's a list of constants with predefined formats on the DateTime object, for example instead of outputting ISO 8601 dates with:
<?php
echo date('c');
?>
or
<?php
echo date('Y-m-d\TH:i:sO');
?>
You can use
<?php
echo date(DateTime::ISO8601);
?>
instead, which is much easier to read.
Also in PHP:
- array key exists laravel
- check if object key exists in php
- console print in php
- display al errros php
- filter in route:list
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0".
- date i php
- error reporting php all
- $user = User::find($request->userid);
- all letters capital php
- create dir php
- Count length of array string.in php
- create foreign key laravel migration
- check string exist in string php
- ethrow exception php
- check if char exists in string php
- count() parameter must be an array or an object that implements countable laravel
- * in array key php
- all cap in php
- array key exists php
- convert space to 20 php
- debug php with print
- add display_errors in funtion php
- A random character from a string of characters: