PHP code example of chitwarnold / n2w

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

    

chitwarnold / n2w example snippets


#import the libraries
use chitwarnold\n2w\en\N2w;
use chitwarnold\n2w\en\readers\N2wReaders;


# get some spellcheck done
$_spelling_bee = new N2w();
$decimal_point  = 2;
$start = 100;
$stop = 200;
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++".PHP_EOL;
echo "| Range Counting challenge From $start to $stop |".PHP_EOL;
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++".PHP_EOL;


for($i = $start; $i <= $stop; $i++)
{
    $spell = $_spelling_bee->updateChallenge($i,$decimal_point)->spell();
    echo "$i."." ".$spell.PHP_EOL;
}