2

Possible Duplicate:
How to decode Unicode escape sequences like “\u00ed” to proper UTF-8 encoded characters?

Which PHP function can decode string

foo\u0040foo.com

to

foo@foo.com

How it works?

Thanks for any help!

Community
  • 1
  • 1
Maratto
  • 21
  • 2
  • The usual reason for this question is handling JSON, in which case the answer is to use a proper JSON parser (eg `json_decode`) and not attempt to fix the string yourself. – bobince Jul 14 '11 at 21:05

1 Answers1

0

If it's only ever going to be that one specific character, you could just do a simple str_replace('\u0040','@',$string).

Spudley
  • 166,037
  • 39
  • 233
  • 307