date phhp
$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:
- divide page in pdf with page break using php
- Fatal error : Allowed memory size of 134217728 bytes exhausted
- add new column in existing table in laravel migration
- change header location in php
- attach multiple files in laravel mailable
- encode in laravel api
- execution time exentd php
- catch php errors
- create an exception php
- base64 decode encode online php
- array reverse php
- check if string matches php
- elevated th in dates format php
- dump all variables twig
- STING TO UPPER PHP
- Customer::insert([ 'customer_name' => $request->customer_name, 'customer_mobile'=> $request->customer_mobile, 'user_id'=>Auth::user()->id, 'created_at'=> Carbon::now() ]);
- base64 decode using php
- add header to php
- error dipalyer rphp
- count of string in laravel
- Y-m-d H:s:i input
- catch an exception php
- find str in str php
- find string into string