day of week 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";
}$dateTime = new \DateTime();
/**
* You can get the string by using format
*/
$dateTime->format('Y-m-d H:i:s');$timestamp = strtotime('2009-10-22');
$day = date('D', $timestamp);
var_dump($day);
Also in PHP:
- create new laravel project terminal
- PHP Get Current Time in format with DateTime Class
- base 64 implementation php
- cron.php
- connect mongodb with php
- echo date to page in php
- check if home page woocmerce
- cappitalize string in php
- Enable Timestamps in Laravel Models
- cache forget laravel
- How to see if there is a - in a string in php
- check if array has file in index
- day of week php
- disable cache laravel 8 development
- echo header in php
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in windows local
- base64 encode php and decode
- can i back up mysql database from php code?
- $testing_recipient_email_list = str_replace('@', "+{$recipient}@", $testing_recipient_email);
- base 64 image encryption using php
- find index of occurrence php
- check if key exists in php
- end session variable php
- create a new project laravel