calculate total time from start and end datetime in php
date1 = new DateTime('2006-04-12T12:30:00');
$date2 = new DateTime('2006-04-14T11:30:00');
$diff = $date2->diff($date1);
$hours = $diff->h;
$hours = $hours + ($diff->days*24);
echo $hours;
Also in PHP:
- check null in_array php
- array_key_exists() function
- check if word exist in string
- cache eloquent laravel 8
- encryption key has not encrypted laravel
- add one day to given date in php
- apache php default date format 4 digits
- error enable in php
- autoload file in laravel
- array_combine function in php
- convert time to string in php
- convert uppercase to capitalize in php
- Target class does not exist.
- create seed laravel
- expire Cache Manually laravel
- TIME 24 FORMAT PHP
- base 64 encode decode not same php
- determine length of stirng php
- PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp ecified key was too long; max key length is 1000 bytes")
- date format in day name of month and year in php
- date in php in dats
- @if(Auth::user()->id(1))
- error show all php
- check if string contains substring php