I am a "newbee"
I have made a site " bubble under "by reading the book "Built your own Website"
Now I am updating the site by adding more features and modules by making use of MYSQL and PHP. Like now I have created a database and want to display a table coming from database.
I am referring the sitepoint Book "php__mysql_novice_to_ninja_5th_edition". Its a great book help me in learing PHP and MYSQL in website development.
I have a problem in building script
As I want to display all the columns of the club_event table which I made in Localhost server XAmpp and wrote the code as under to retrieve all columns
while ($row = $result->fetch())
$events = array('Date' => $row['Date'], 'Description' => $row['Event_Description']);
but I am unable to display all the columns in my website.
by below code:
<?php echo htmlspecialchars($club_event , ENT_QUOTES, 'UTF-8'); ?>
If I want to display single column it is working but for all columns to be displayed it is giving an error:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\xampp\htdocs\bubble\events.html.php on line 12
Kindly help me out resolving this issue.