MySQL Data to JSON

How to convert MYSQL Datas to JSON.

json_encode ($datas)

json_decode($datas)

Advertisements