PHP code example of tel3scop / otus-composer-package

1. Go to this page and download the library: Download tel3scop/otus-composer-package 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/ */

    

tel3scop / otus-composer-package example snippets

 

$page = 3; // Номер страницы
$limit = 10; // Лимит записей на странице

$paginator = new Paginator();
$offset = $paginator->getOffset($page, $limit);
echo "Для страницы $page с лимитом $limit Offset = $offset";