Location: PHPKode > scripts > Word Solver > example.php
 * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com 
 * Feel free to distribute and modify code, but keep reference to its creator 
 * Word Solver class can generate words or anagrams using provided rules, for example,
 * possible letters, placement of specific letter, which letters should be used together,
 * or using any character from specified alphabet.
 * This class can be used to generate solutions to scrabble, crosswords, anagrams 
 * and other word games.
 * For more information, examples and online documentation visit:  
 * http://webcodingeasy.com/PHP-classes/Generate-words-from-specified-rules

//it can take some time
$time = microtime();
$time = explode(' ', $time);
$start = $time[1] + $time[0];

//declaring class instance
$ws = new word_solver();

//use all provided letters

//setting rules for words

//getting results
$arr = $ws->get_words();
echo "<pre>";
echo "</pre>";

$time = microtime();
$time = explode(' ', $time);
$end = $time[1] + $time[0];
$total_time = round(($end - $start), 4);
echo '<p>PHP execution: '.$total_time.' seconds.</p>';
Return current item: Word Solver