Word Puzzle Maker in PHP

This program creates a word puzzle according to given input, then it can print out the key. It has three parts: puzzle.html, wordFind.php, wordFindKey.php. They are presented respectively:

puzzle.html

wordFind.php

wordFindKey.php

4 thoughts on “Word Puzzle Maker in PHP

  1. Thanx, very nice. But change the archive for download – its code doesnt work properly! The code on the page is working all right.

  2. Parse error: syntax error, unexpected ‘”‘, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\xampp\htdocs\wf\wordFind.php on line 302

  3. The code as-is above does not work now, as awa posted.  What fixed it for me was changing the PRINT <<<here part to exit php and do oit instead, e.g.:

     

    ?>
    <center>
    <h1><?php echo $boardData[“name”]; ?></h1>
    <?php echo $puzzle; ?>
    <h3>Word List</h3>
    <table border = 0>

    <?php
    foreach ($word as $theWord){
    print “<tr><td>$theWord</td></tr>\n”;
    } // end foreach
    print “</table>\n”;
    $puzzleName = $boardData[“name”];

    //print form for requesting answer key.
    //send answer key to that form (sneaky!)
    ?>

    <?php

  4. If you change ‘here’ to capital HERE to match the closing HERE tag may fix it too.

    The syntax highlighter I am using is a mess right now. There seems no easy way to fix it. But either way, those bugs should be small so that you can figure out ways to fix those small things easily I hope.

Leave a comment

Your email address will not be published. Required fields are marked *