PHP code example of osamz / quran-safahat

1. Go to this page and download the library: Download osamz/quran-safahat 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/ */

    

osamz / quran-safahat example snippets


$startAya = $helper->getCheckedAyaPoint("النازعات", 17);
$endAya =   $helper->getCheckedAyaPoint("المرسلات", 50);

$clip =   new QuranClip($startAya, $endAya);

$quran =  new QuranNaskhEdition($quranData);

$quranCalculator = new QuranCalculator($quran);

$clipSize = $quranCalculator->calculate($clip);
echo "Pages: $clipSize->pages, and $clipSize->lines lines.";
// Pages: 4, and 1 lines.