How to query the database and fetch the data as arrays and objects in php

preview_player
Показать описание
In this quick memory refresh tutorial we are gonna see how we can turn the data fetched from the database, into a php array or an object.
We are going to use the fetch methods that the mysqli_result object provides us, to create arrays and objects from the database data.

We are gonna see two functions.
The fetch_assoc method which will grab the database data as an associative array.
And the fetch_object function which (as the name implies) fetches the
database data (rows and columns) as an object.

I hope you like the video. Thanks for watching.

You can read a more detailed article on my website:

You can follow or leave a message to my facebook page:

Рекомендации по теме
Комментарии
Автор

You deserve more subscribers and attention

zaifhossain
Автор

Can I use select * with fetch_assoc ??

tusharkumbhar
Автор

Didn´t you make a video with your voice why do you deleted it was nice.

tiagoborges