Hi all,
I have a string which looks like the following
“Date”:“Tuesday, June 18, 2019”,“Notes”:"» None",“Detail”:" \n » Members Required: …etc
It’s part of a JSON which I am trying to manipulate so this happens multiple times within the file.
I am ideally looking for something PHP that says: Everytime I see “Detail”:" ditch the 4 characters after it, rinse and repeat for the rest of the file.
I’m basically trying to get rid of the \n new line but there are other lines I need to keep in the rest of the file so I can’t really do a str_replace for all \n.
I thought of a str_replace i.e.:
str_replace(’“Detail”:" \n »’,’“Detail”:" »’,$content);
but i can’t get that to work at all.
Any help would be appreciated.
Thanks,
Chris