Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Get All dates of a month

 get all of dates ( day ) from a month...

$month = '2015-01';
$start = Carbon::parse($month)->startOfMonth();
$end = Carbon::parse($month)->endOfMonth();

$dates = [];
while ($start->lte($end)) {
     $dates[] = $start->copy();
     $start->addDay();
}

echo "<pre>", print_r($dates), "</pre>";
Comment

PREVIOUS NEXT
Code Example
Php :: php variables examples 
Php :: What was the old name of PHP? 
Php :: validate file exist php 
Php :: php in html need .htaccess 
Php :: trim php 
Php :: comment installer laravel avec docker 
Php :: mail function php not working 
Php :: doctrine where 
Php :: single row data from table in laravel 
Php :: php array_diff_assoc 
Php :: php artisan app:name in laravel 6 
Php :: php is datetime 
Php :: laravel package console command 
Php :: php form validation 
Php :: ereg function in php 
Php :: merge pdf php fpdf 
Php :: stored procedure laravel 
Php :: laravel login and registration with command 
Php :: laravel join 2 tables eloquent 
Php :: different between two dates 
Php :: get email with preg grep php 
Php :: include vendor/autoload.php 
Php :: Users/admin/Library/Caches/composer/files/laravel/laravel/1548f0533da115f0828fab4ef0c3923cd57879b6.zip): Failed to open stream: Permission denied 
Php :: yii2 rollback last migration 
Php :: laravel email forgot password 
Php :: Include Or Require Multiple Files On 1 Line 
Php :: how to select max write textarea value in php 
Php :: php csv to multirow array $_FILES 
Php :: wordpress plugin public page 
Php :: Differentiate PHP include and require statement 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =