In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the use of the mysqli_fetch_array () function in PHP. It is very detailed and has a certain reference value. Interested friends must finish reading it!
Mysqli_fetch_array () function
The mysqli_fetch_array () function can take a row from the result set and return it as an associative array, an indexed array, or both, depending on the parameter. Its syntax format is as follows:
Mysqli_result::fetch_array ([int $resulttype = MYSQLI_BOTH])
This is an object-oriented syntax, and here is a process-oriented syntax:
Mysqli_fetch_array (mysqli_result $result [, int $resulttype = MYSQLI_BOTH])
Among them, it should be noted that:
Mysqli_result and $result are represented as the result set obtained using the mysqli_query () function.
Resulttype is an optional parameter, which is a constant that sets the type of return value, which can be MYSQLI_ASSOC, MYSQLI_NUM, or MYSQLI_BOTH that represents a different type of return value.
Next, let's take a look at the use of the mysqli_fetch_array () function through an example, as follows:
Output result:
In the above example, we chose to return the data in the form of an associative array, and we can select different types of return values through the mysqli_fetch_array () function.
These are all the contents of the article "what is the use of the mysqli_fetch_array () function in PHP?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.