-6
4

2 回答 2

0

It seems you have json inside the <code> tag.
So first (after you get the inner html of the <code> tag) get rid of the comments ('<!--', '-->') and then use function json_decode()

于 2013-11-04T13:47:05.277 回答
-1

Take a look at PHP's strip_tags function: http://php.net/manual/en/function.strip-tags.php

This will at least remove the HTML entities from your string. You can also specify any HTML entities (tags, comments, etc.) that you want to keep, while removing everything else.

于 2013-11-04T13:46:03.783 回答