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?

Thanks

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

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