<!-- example -->

        /* Lots of contents, header, etc.
            if (isset($_GET["id"])) {
                echo $anexample[$_GET["id"]]["test"];

There would be links that would say example.php?id=1 and id=5 and id=9. However I'd like page to rerender just that particular place. Nothing else in page will change. Is it possible (with usage of JavaScript and jQuery) to change content (by reprocessing this PHP snippet) without reloading the webpage? I know I can use AJAX and use external PHP file to obtain the answer, but still, I'd like to avoid calling external files.

I think you might interest in SPFJS, that's used by Youtube. It is still using Javascript.