PHP - SQL SELECT statement in PHP

The following PHP code is used to select data from a MySQL table and to then display the data in a Web browser.

$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'];



Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 30ff4 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |