Mistake In Code

https://www.sitepoint.com/premium/books/php-mysql-novice-to-ninja-7th-edition/read/6/kye1h3p6/?fromShare=true

Will produce this output:

Warning: Array to string conversion in /app/public/phpmysql7/public/jokes.php

To fix it, add [‘joketext’], like this:

echo '<ul>';
foreach ($jokes as $joke) {
    echo '<li>' . $joke['joketext'] . '</li>';
}
echo '</ul>;';

Link to content:  PHP & MySQL: Novice to Ninja, 7th Edition - Section 6