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