Set php variable to string -


i have this:

$rm = json_decode($room_list[0]['room']); 

and want set variable $string include result of echo of above variable.
example, if:

echo json_decode($room_list[0]['room']; 

echos: lorem ipsum <a href="www.google.com>gg</a>.

i want string be:

$string = 'lorem ipsum <a href="www.google.com>gg</a>.' 

how can that?

it looks you're trying this: how use json.stringify , json_decode() properly

so basically, take stripslashes(htmlspecialchars(json_data)) answer , put $rm = in front :)


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -