I have 5 pictures stored in a folder and their links stored on the database.
I want to put them in a table of three columns on each row.
PHP Code:
    <table border='1'>
    if (
"The application has failed to connect to the mysql database server: " .mysqli_connect_error();
$result mysqli_query($connection"SELECT * FROM fruits_tbl")or die("Error: " mysqli_error($connection));
$rows =  $num_rows/3;

$i=1$i<=$rows $i++)
$row mysqli_fetch_array($result))
"<td width='180px' height='200px'>"
."<div class = 'fruit_image'>"
."<img src='"
."<div class = 'fruit_title'>"

The above code I created, contains two FOR loops. The script should count the number of rows in the table, and then divide by 3(the number of columns on each row in the HTML table).
I wonder where I'm going wrong with this code.