F d 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";
}/**
* 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:
- clear single cache laravel 6
- Allowed memory size of 134217728 bytes exhausted laravel
- create random username with numbers and letters php
- command to create laravel project
- append new line php
- check array has key data
- console log php variable
- composer require guzzlehttp/guzzle
- "Allowed memory size of 134217728 bytes exhausted (tried to allocate 56627200 bytes)" in wamp
- day plus one php
- empty table in laravel
- array de objetos php ejemplos
- extract($user_input); alternative php
- consloe.log php
- AWS HTTP error: Error creating resource: [message] fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- create random_str laravel
- convert image path to base64 php
- create laravel app
- check if $this-> key exist php
- a format of unique string to be generated in php
- array key exi
- check if a char is in a string php
- catch new exception php
- composer create-project laravel/laravel 8