php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "FETCH_ASSOC"

Is it recommended to use fetch(PDO::FETCH_ASSOC) or set the default fetch mode to FETCH_ASSOC in PDO prepared statements in PHP?

When using PDO prepared statements in PHP, it is recommended to set the default fetch mode to FETCH_ASSOC in order to retrieve results as an associati...

How can one access the MySQLi_Result::fetch_assoc() method when using MySQLi_STMT::store_result() in PHP?

When using MySQLi_STMT::store_result() in PHP, the result set is stored in a MySQLi_Result object associated with the statement. To access the fetch_a...

What are the advantages of using fetch_assoc() over fetch_object() in PHP when dealing with database results?

When dealing with database results in PHP, using fetch_assoc() over fetch_object() can be advantageous because fetch_assoc() returns an associative ar...

Why is it important to include a semicolon after $row = $result->fetch_assoc() in PHP?

It is important to include a semicolon after $row = $result->fetch_assoc() in PHP because the semicolon is used to terminate statements in PHP. Omitti...

What are the differences between using fetch_assoc and fetch_array in PHP sessions?

When fetching data from a MySQL database in PHP sessions, the main difference between using fetch_assoc and fetch_array is the format in which the dat...

Showing 1 to 5 of 153 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 30 31 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.