The following PHP code is used to select data from a MySQL table and to then display the data in a Web browser.
<?php
$con = new mysqli('ip_or_domain','username','password','database');
$select = "SELECT * FROM tablename";
$query = mysqli_query($con, $select);
while ($row = mysqli_fetch_array($query)) {
echo $row['columnname'];
}
?>