Answer the question
In order to leave comments, you need to log in
Outputting data from the database to the site page. How to do?
I have a MySql database. I removed all the data in the code)) Here is a code that displays arrays of data from a database of this type
Array ( [ID] => 1 [Diametr] => 14 [Width] => 555 [Height] => 666 [Marka] => kama )
Array ( [ID] => 2 [Diametr] => 22 [Width] => 3 [Height] => 44 [Marka] => cordiant ) Tell me
how we can display this data, for example
<?php
$mysqli = @new mysqli('localhost', 'name', 'pass', 'bd');
$result_set = $mysqli->query('SELECT * FROM autoobuv_spb');
while ($row = $result_set->fetch_assoc()) {
print_r($row);
echo "<br />";
}
$result_set->close();
$mysqli->close();
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question