Error regarding pg 161 of Database Driven Website

When I update my index.php file on page 161 I get the following error:

Undefined variable joke on line 92 referring to the line in bold. How do I declare a table within a database?


$result = mysqli_query($link, ‘SELECT, joketext, name, email
FROM joke INNER JOIN author ON authorid =’);
if (!$result)
$error = 'Error fetching jokes: ’ . mysqli_error($link);
include ‘error.html.php’;

while ($row = mysqli_fetch_array($result))
$jokes = array(‘id’ => $row[‘id’], ‘text’ => $row[‘joketext’],
‘name’ => $joke[‘name’], ‘email’ => $joke[‘email’]);

You meant $row[‘name’] and $row[‘email’], not $joke