I know it's a stupid question but I am done experimenting and wasting further time on it. To cut the story short here's what I am battling with:
I have a string $userName = "John \uD83D\uDE0D\uD83D\uDE0D\uD83D\uDE0D";
I have to apply json_decode()
on all unicode occurrences in this string like \uD83D
, \uDE0D
, \uDE0D
etc.
I thought I could use some regex based solution. Can you help me get this done.