<?php $doc = new DomDocument; $doc->loadHTML('<body> <script id="something" type="application/json"> { "a": { "b": "c" }, "d": { "e": "f" } } </script> </body>'); $something = $doc->getElementById('something'); var_dump($something->textContent);
You have javascript disabled. You will not be able to edit any code.