How to preformat a JSON array before try to decode in PHP?

Im trying to decode a JSON array which is similar to the one that I have mentioned below.Since there is an apostrophe sign in the word “Students”, json_decode() doesn’t work on this.Is there a way that I can preformat this array before try to decode it?

json_decode(‘{
“data”: [
{
“created_time”: “2017-10-29T12:53:10+0000”,
“message”: “Exactly 4 years ago from today, SAIFA made the statement !!!”,
“story”: “SAIFA – Students’ Association for Industrial and Financial Analysis shared a memory.”,
“id”: “596004237116961_1708160839234623”
}
]
}’
);

Read more here:: How to preformat a JSON array before try to decode in PHP?

Leave a Reply

Your email address will not be published. Required fields are marked *