Beginning PHP4 chapter 8
Error in hangman example in chapter 8:
I got this error message:
Undefined variable: letters
This can be solved, by replacing the last line in the first grey block on page 274:
if (!isset($word_number)) { .......}
with
if (!isset($word_number)) {
$word_number = rand(1,count($words)) - 1;
$letters = "";
}
Same problem for variable $links : it can be set before the first line in the 3rd grey block on page 274:
$links = ""
|