How to convert object data into json string in PHP? -


I am getting results in the object and I have to change it in Jason and I do not understand that doing this I need help

<< p> << p> << p> << p>] = & gt; Chang Sindelar) [1] = & gt; Study Class Object ([user_id] = & gt; 84 [username]] = Sylvester Hillebrand))

and I convert to json string Want to I want some results in this way:

  {"85": "Chang Sindelar", "84": "Ezekiel Watersson", "83": "Sylvester Hillebrand"}  

No Idea

Thank you.

Using this function, your object will return to the array of properties of that object.

  array get_object_vars (object $ object) returns get_object_vars ($ your_object_variable_here)  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -