Y-m-dTH:
date('w'); //gets day of week as number(0=sunday,1=monday...,6=sat)
//note:returns 0 through 6 but as string so to check if monday do this:
if(date('w') == 1){
echo "its monday baby";
}/**
* Its always best to use a datetime object
*/
$dateTime = new \DateTime();
/**
* You can get the string by using format
*/
$dateTime->format('Y-m-d H:i:s');
Also in PHP:
- find index of occurrence php
- easiest way to setup a new laravel project
- explode comma php
- echo all php error
- codeigniter db insert return id
- custom front page to whmcs
- Show all laravel valet folders
- Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
- command for create project in laravel
- ccodeignter insert return inserred id where
- : 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tabl e `users` add unique `users_email_unique`(`email`))
- cache flush laravel
- create new laravel project with specific version
- $_GET['date']
- echo foreach
- date from unix timestamp php
- .htaccess file for codeigniter
- Wordpress login page Background Image / Logo Image
- disable register route laravel
- @if($success->any())
- composer in laravel
- catch (Exception $e)
- check where key in associative array have a value
- destrroy a session php