Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php date loop

$startTime = strtotime( '2010-05-01 12:00' );
$endTime = strtotime( '2010-05-10 12:00' );

// Loop between timestamps, 24 hours at a time
for ( $i = $startTime; $i <= $endTime; $i = $i + 86400 ) {
  $thisDate = date( 'Y-m-d', $i ); // 2010-05-01, 2010-05-02, etc
}
Comment

PREVIOUS NEXT
Code Example
Php :: error log array 
Php :: php difference between two dates in years months and days 
Php :: php convert degrees to radians 
Php :: laravel clear all cache 
Php :: remove phpmyadmin ubuntu 20.04 completely 
Php :: unix timestamp in php 
Php :: is number divisible by 3 php 
Php :: eloquent run seeder 
Php :: php loop through array 
Php :: session flush laravel 
Php :: php change file extension 
Php :: get http referer php 
Php :: home url wordpress 
Php :: get database name laravel 
Php :: ian holm 
Php :: wordpress get username 
Php :: laravel convert datetime to date 
Php :: php get ip address of visitor 
Php :: wordpress execute query 
Php :: laravel db exists 
Php :: get yesterday date in php 
Php :: create new laravel project with specific version 
Php :: carbon day 30 days ago 
Php :: php is variable a number 
Php :: array empty check in php 
Php :: laravel eloquent increment 
Php :: Date time format for laravel validation 
Php :: laravel not finding asset files in public directory 
Php :: wordpress define constant if not defined 
Php :: validate audio file in laravel 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =