![]() ![]() In PHP, we have predefined functions to perform JSON encode and decode operations on PHP objects. It is used to convert the PHP objects into the JSON objects. It returns the result of the encoding operation. In the above syntax, the data must be passed as an object or as an array. The problem is that at the other end Im unable to decode this using jsondecode (), the result it NULL. ![]() Let’s see how it can be performed in Core PHP: name = "Happy" Suppose we have an object of a student having the name, age, and college, etc and we want to encode the data using json_encode().
0 Comments
Leave a Reply. |