$sql = "select * FROM tableName;"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($result)) { echo $row['columnName']; }