PHP Try it yourself interpreter

I want to design a php try it yourself interpreter like we have in w3schools.com for CSS and JS. I googled plenty of stuff i could not find something helpful. What i have tried so far is:

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>

    </head>

    <body>
    </div>
    <form action="<?= $_SERVER["PHP_SELF"] ?>" method="POST">
    <input type="submit">

    <textarea name="code"><?= htmlentities($_POST["code"]) ?></textarea>

    <div id="output">
      <?= $_POST["code"] ?>
    </div>
    </body>
    </html>

I have taken this code from on of the websites on web and honestly speaking its a part of my assignment, i just need some guidance.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.