0
What is the difference between foreach() and fetchAll() in PHP
Please i want someone to explain the difference between foreach() and fetchAll() in PHP
1 Respuesta
+ 1
* foreach is commonly used to iterate through an array.
https://www.w3schools.com/php/php_looping_foreach.asp
* fetchAll is a PDO statement used for fetching the result of a SQL queery execution.
https://www.php.net/manual/en/pdostatement.fetchall.php