Search
 
SCRIPT & CODE EXAMPLE
 

PHP

seconds to days hours minutes seconds php

function seconds2human($ss) {
$s = $ss%60;
$m = floor(($ss%3600)/60);
$h = floor(($ss%86400)/3600);
$d = floor(($ss%2592000)/86400);
$M = floor($ss/2592000);

return "$M months, $d days, $h hours, $m minutes, $s seconds";
}
Comment

php date to seconds

<?php
$str = 'Tue Dec 15 2009';
$timestamp = strtotime($str);
echo $timestamp;
//output: 1260831600
?>
Comment

PREVIOUS NEXT
Code Example
Php :: how to write for loop in laravel blade 
Php :: clear session php 
Php :: php check if url parameter exists 
Php :: laravel tinker add user 
Php :: make controller laravel 8 with resource 
Php :: Carbon Add Months To Date In Laravel 
Php :: wp revisions config 
Php :: how to use dompdf in laravel 
Php :: laravel avoid logged in user to access a page 
Php :: password hashing in laravel 
Php :: laravel blade time difference 
Php :: php sort array by key 
Php :: boot method laravel life cycle 
Php :: count sql query in php 
Php :: php check if function exists 
Php :: php get object keys 
Php :: smtp server xampp 
Php :: convert object to array in php 
Php :: php time difference in hours 
Php :: how to retrieve value from stdclass array in php 
Php :: php find substring 
Php :: array_key_exists vs isset 
Php :: display image in laravel 
Php :: Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php 
Php :: 24 hours date format php 
Php :: phpmailer send attachment 
Php :: wordpress get site title 
Php :: laravel join 
Php :: php slugify 
Php :: How do I make a redirect in PHP? 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =