Recommend this page to a friend! | ![]() |
![]() |
All requests ![]() |
> | Arrays from database | > | Request new recommendation | > | ![]() |
> | ![]() |
||
by marcelo benitez - 11 months ago (2015-03-01) array database
+4 | I need to extract rows from a database in array format |
1. by Manuel Lemos - 11 months ago (2015-03-04) Reply
What database are you using? Is it MySQL or something else?
+1 |
I think most MySQL database access classes can return results in arrays. If you need the results in JSON format, it is just a matter of using json_encode. Anyway, this class can already return the results in JSON format already. It also uses the MySQLi extension, so it will work in newer PHP versions. |
+4 |
Try out this class. It returns the result of a query as an array. The catch is that, the class is database-independent. It can work with a mysql, sql server, sqlite or even pgresql database |
Recommend package | |
|