Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of the mysqli_fetch_row () function in PHP

Shulou Source: shulou.com Published: 2022-06-01 02:59:25 09月22日 Update

This article will explain in detail what is the use of the mysqli_fetch_row () function in PHP. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Mysqli_fetch_row () function

The mysqli_fetch_row () function can take a row from the result set and return it as an indexed array with the following syntax format:

Mysqli_result::fetch_row ()

This is written in an object-oriented way, and in a process-oriented way as follows:

Mysqli_fetch_row (mysqli_result $result)

It is important to note that mysqli_result and $result are represented as result sets obtained using the mysqli_query () function.

Next, let's take a look at the use of the mysqli_fetch_row () function through an example, as follows:

Output result:

In the above example, one of the rows of data in the database is successfully queried through the mysqli_fetch_row () function and is returned as an indexed array. Then let's take a look at different forms of return.

This is the end of the article on "what is the use of the mysqli_fetch_row () function in PHP". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Tags: Functions data examples articles results next one line writing form database array more index statement different good practical successful content object Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS vpn OPPO Reno Redmi NVidia