PHP code example of dickinsonjl / lorum

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

    

dickinsonjl / lorum example snippets



Dickinsonjl\Lorum\Lorum;


$lorum = new Lorum();
$lorum->buildCache(); // build text Catalogue from LorumSeed file


echo $lorum->giveMeWord(1) . PHP_EOL; // specify word length as argument
echo $lorum->giveMeWord(2) . PHP_EOL;
echo $lorum->giveMeWord(3) . PHP_EOL;
echo $lorum->giveMeWord(4) . PHP_EOL;
echo $lorum->giveMeWord(5) . PHP_EOL;
echo $lorum->giveMePhrase() . PHP_EOL;
echo $lorum->giveMeSentence() . PHP_EOL;
echo $lorum->giveMeSentence(1) . PHP_EOL; // specify number of phrases for the sentence
echo $lorum->giveMeParagraph() . PHP_EOL;
echo $lorum->giveMeMultiParagraph(5) . PHP_EOL; // specify number of paragraphs