从PHP端的JSON字符串中检索值

I was confused that I am no idea for this problem. I am trying to retrieve the JSON string that posted from Android via httppost method. The string received in PHP side like below:

{"email": "abcde@xxxxxx.com","psw":"efgh"}

How to retrieve the namepairs value ? I want to the "email" and "psw" values can be saved to $email and $psw variable in PHP.

Thanks for the help !

You can use json_decode.

$json = '{"email": "abcde@xxxxxx.com","psw":"efgh"}';
print_r(json_decode($json, true));