W
W
Web Kyb2018-09-02 21:03:23
PHP
Web Kyb, 2018-09-02 21:03:23

How to output all records from a mysql column?

I'm just starting to understand php, I don't quite understand how to display all records from one column, there is a piece of code that should get and display records from this column from the database, namely the name of those who are there, but for some reason it displays only one record from the column , maybe I didn’t add something?

$result=DB::query("SELECT * FROM `mg_hoax` order by `fio`");
$user_new = $result->fetch_assoc();

echo $user_new;
Outcome: Ivanov Ivan Ivanovich1 (there are three of them in the column)
What should be added so that all names are displayed?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question