\n";
// while loop both worked
//while ($row = mysqli_fetch_array($result,MYSQLI_ASSOC)) {
while ($row = mysqli_fetch_row($result)) {
//
foreach ($row as $item) {
//echo "".($item !== null ? htmlentities($item, ENT_QUOTES):" ")." | \n";
echo "".($item)." | \n";
} //foreach ends
echo "\n";
//
}//end while loop
echo "
\n";
//closing output table
$row_count = mysqli_num_rows($result);
echo "row count " . $row_count;
mysqli_free_result($result);
// closing connection
mysqli_close($conn);
echo "