Category Archives: PHP

How to convert php class to json

1.Create a PHP classs with below code 2.Now  create an object of above php class like 3.Now use get_object_vars($Obj) and json_encode() function in php as shown below. 4.Output will be ,we can also give an array in place of data and it … Continue reading

Posted in PHP | Leave a comment