Whenever I submit a comment to facebook, it returns the id in this format:
{"id":"1178215146_2开发者_StackOverflow中文版244093420005"}
Do you know how I can get this value out with PHP?
The string you pasted is JSON. Use $arr = json_decode($val, true);
. You'll get an associative array, and you can access the value with: $arr['id']
.
json_decode
documentation
精彩评论