I
I
Ilyusha Prokopiev2015-10-21 01:14:47
PHP
Ilyusha Prokopiev, 2015-10-21 01:14:47

How to display the entire array loaded from MySQL?

I have been suffering with one problem for a long time
. When I display an array loaded from MySQL, one of the elements is not displayed, I have to load it separately. And the reason is generally clear - there is no error in the code - the problem is in the imperfection of the code. Maybe someone will suggest a more interesting output method. How do I output:

while($row = mysql_fetch_array($result)){
//действия внутри цикла
};

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nadz Goldman, 2015-10-21
@nadz

Everyone does this:

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
    printf("ID: %s  Имя: %s", $row[0], $row[1]);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question