-6

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.

Ali Tariq
  • 1
  • 6

1 Answers1

0

You can use PHP Console

You can clone or download the ZIP file from official GitHub Page, and navigate to the path where you have installed via your browser.

Note: You need some tweaking if you want to use it online(on your website etc..)

Gordon's answer

Hope this helps. :)

Community
  • 1
  • 1
Snazzy Sanoj
  • 804
  • 1
  • 11
  • 28