PHP code example of russ666 / yii2-countdown
1. Go to this page and download the library: Download russ666/yii2-countdown 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/ */
russ666 / yii2-countdown example snippets
echo \russ666\widgets\Countdown::widget([
'id' => 'some-id',
'datetime' => date('Y-m-d H:i:s O', time() + 1000),
'format' => '\<span style=\"background: red\"\>%M</span>:%S',
'tagName' => 'span',
'events' => [
'finish' => 'function(){location.reload()}',
],
])