1. Go to this page and download the library: Download teragon/calendar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Generate a calendar for the current month and year
Calendar::generate();
// Generate a calendar for the specified year and month
Calendar::generate(2012, 6);
// Add an array of events as the third parameter to add them to the calendar,
// keys should be the days of the month.
$data = array(
3 => 'http://example.com/news/article/2006/03/',
7 => 'http://example.com/news/article/2006/07/',
13 => 'http://example.com/news/article/2006/13/',
26 => 'http://example.com/news/article/2006/26/'
);
Calendar::generate(2006, 6, $data);
// Add an array of events as the third parameter to add them to the calendar,
// keys should be the days of the month.
$data = array();
$data[3][] = array(
'content' => 'http://example.com/news/article/2006/03/',
'attr' => array(
'class' => 'some-css-class'
)
);
$data[3][] = array(
'content' => 'http://example.com/news/article/2006/04/',
'attr' => array(
'class' => 'some-css-class'
)
),
$data[12][] = array(
'content' => 'http://example.com/news/article/2006/10/',
'attr' => array(
'class' => 'another-css-class'
)
),
Calendar::generate(2006, 6, $data);