|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not enough user ratings||Total: 306 ||All time: 7,344 This week: 404|
This class can search a word in a 2 dimension array of characters.
It can take a string with different rows of characters separated by | and splits it to extract the list of characters in the 2 dimension grid.
The class can search for a given word that may appear in the grid horizontally, vertically or diagonally.
In the end it can also display the grid of characters in an HTML table.
Prize: One downloadable e-book of choice by O'Reilly
|Crossword is a well known puzzle game that consists in finding words from a list that appear in a grid laid out either horizontally or vertically.
This class can search a word in a 2 dimension array of characters, thus helping to find words in a crossword puzzle automatically.
$wordsearch = new WordSearch();
$wordsearch->string = "KEEDKFORFEEDS|GEEESQUIZFEED|EEEQAPRACTICE|FEEGEEJACTICE|GEEQAPRACTICE|FEEDAPRACTICE|KEEKKFORFEEDS";
$wordsearch->word = "FEED";
<?php echo $wordsearch->gridHtml(); ?>
<?php echo $wordsearch->run()->resultHtml(); ?>
Search a word in a 2d array of characters using PHP
A word can me matched in 8 directions, The 8 directions are horizontally left, horizontally right, vertically up and 4 diagonal directions.
below example, in this string word FEED can be found in diffrent places
This class is help to find all occurances of word by converting string into 2d array.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.