The PHP function fetch_array() is used to fetch a row as an associative array or numeric array from a result set produced by a query executed using mysqli_query() or mysqli_stmt_execute(). This function returns an array where the key of the array is the column name or column number and the value of the array is the value of the column.
Example 1: Using fetch_array() to retrieve data from a database table and display it on a webpage using a while loop in PHP.
Example 2: Using fetch_array() inside a function to retrieve data from a database table and return it in an array.
These examples are using the mysqli package library, which provides an object-oriented interface to connect to a MySQL database in PHP.
PHP DB::fetch_array - 30 examples found. These are the top rated real world PHP examples of DB::fetch_array from package TeamPass extracted from open source projects. You can rate examples to help us improve the quality of examples.