Hi,
Thanks for your replies. Yes xyph, essentially I am to create a very basic parser. I want users to be able to enter a php script in the input box, enter submit button, and the output of this script appear in the output text area. The reason I am using regex is because my tutor has told me to, however, I did have an other idea.
I was considering the idea of capturing and writing the scripts which users enter into a temporary php file on the server, and running a shell_exec function to run the file as a program and then grab the output and print it into the output area. However, im not entirely sure how to go about doing this.
To answer your other two questions, yes I do need to make sure everything is within <?php and ?> tags and eventually I will need to check the scripts for errors!
Any advice on how you would tackle this?
Thanks in advance!
Jamie