I have an array, this array fill with values from database, some of the value contains html tags.
I need to echo this array as json format, so I am using json_encode to do that.
The problem is, when I try to replicate json format (because I need the json to be simpler). I can not replicate value which have html tags.
example:
- original value from database
<span style='font-size:12px'> 25 - 35 " </span><p><span style='font-size:12px'> </span>
- after json_encode(this is what i want it to be)
25 - 35 \" </span> </span>
Thanks