creating a json structure |
I am using fusionAuth. The way it works is that I need to create a json structure called a request, Here is an example of one. Any idea how to create one in CI?
Code: {
proof that an old dog can learn new tricks
Create it using an associated array then json_encode it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I think:
$root = [ 'data' = [ ], 'status' = '', '...' = '...' ]; return json_encode($root); Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams
(09-24-2020, 01:05 PM)richb201 Wrote: I am using fusionAuth. The way it works is that I need to create a json structure called a request, Here is an example of one. Any idea how to create one in CI?Depending on your source of information this is how i do it: Code: $response = [ If you not looping through data i guess you will know what to do. |
Welcome Guest, Not a member yet? Register Sign In |