sorry here is one example I have tried
<?php
$con=mysqli_connect("localhost","root","","test");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM new_cust");
echo "<table border='1'>
<tr>
<th>id</th>
<th>firstname</th>
<th>lastname</th>
<th>email</th>
<th>phone1</th>
<th>phone2</th>
<th>cat</th>
<th>Detail</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
<tr>
echo "<td>" . $row['id']. "</td>";
echo "<td>" . $row['firstname']. "</td>";
echo "<td>" . $row['lastname']. "</td>";
echo "<td>" . $row['email']. "</td>";
echo "<td>" . $row['phone1']. "</td>";
echo "<td>" . $row['phone2']. "</td>";
echo "<td>" . $row['cat']. "</td>";
echo "<td>" . $row['Detail']. "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>