PHP code example of rzakhanov / random-words-generator

1. Go to this page and download the library: Download rzakhanov/random-words-generator 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/ */

    

rzakhanov / random-words-generator example snippets


 

ator = new \RandomWordsGenerator\MakeWords();

try {

    print_r(
        $generator
           #->location('az_AZ')
            ->count(10)
            #->fromLength(3)
            #->toLength(4)
            ->search('shop')
            ->uniqueWords()
            ->generate()
    );

} catch (Exception $e) {
    echo $e->getMessage();
}