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

13th May 2020, 1:50 PM
Anochie Nwabueze Prince
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
14th May 2020, 8:27 AM
Ipang