date('r') php
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";
}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:
- exceptionhandling php
- explode in php
- date today in datetime php
- Class 'App\Http\Controllers\View' not found
- check method in laravel
- check if string contains substrin php
- current user laravel
- This behaviour is (currently) not supported by Doctrine 2
- catch erro message php
- alias seeddb='php artisan db:seed'
- @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
- check if contains a var php
- content type php header
- cut pice of text in laravel
- check if array contains key php
- check if astring is apart of another string in php
- Str larav
- array has key php
- delete file in php
- base64 to image
- creating new laravel project
- check if word exist in string
- SQLSTATE[42000] in laravel
- artisan make auth