How to Get JSON Response from MySQL Database using PHP

preview_player
Показать описание
In This video I have shown that How to get JSON Response from mysql database using PHP. In php a one function is there to convert data into JSON Format
json_encode()
using json_encode() method we can convert php array into json array

First of all you have to make a Database connnection using php then try to fetxh each row and then store into a array and then convert that array into json object and then using print or echo method give response message

-~-~~-~~~-~~-~-
Please watch: "MySQL Database connection in java 12 using eclipse 2019"
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

thanks so much. you save me a lot of time

CiroEndara
Автор

I'm so new at this but you help me a thousand. Thanks man!

nikkidotacan
Автор

Wow! This video just saved me from a week long research, thanks so much I feel like crying

adamstutorial
Автор

some wrong: i have "Szczepa\u00c5\u0084ska" but i need "Szczepańska" - my data base is utf-8, php -> utf-8 - json wont't recognise Polish lang - can you help me?

WTamoe
Автор

is this whats api mean? by providing JSON content to url? so that the frontend developer can work with?

wahidstudios
Автор

hi, why the code return me a white blank page? all data are correct

emanuelevalente
Автор

how can we convert mysql data from multiple tables at once into a json object

majormfr
Автор

how did he stored the json in the database ???? can anyone help?

unknownvjsv
Автор

it shows the following error "Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool"

muhammadrizwan-tzoz
Автор

Why some php file does not have this symbol ?>

mr.RAND
Автор

Why "" on integer how to remove

printonex
Автор

You don't get JSON Response as you write, you only output the array as JSON with Php, it's not the same thing

tonybengue