Page 1 of 1

How to parse PHP string containing multiple PHP blocks?

PostPosted: October 12th, 2012, 8:20 pm
by Piedone
Hi!

I'd like to dynamically run a PHP script that exists in a string. This script is like a view, so it contains multiple PHP blocks inside the PHP tags. This won't work with Eval() and IncludeScript is no option for me as the script is not in a physical file (and I can't write it out to one).

Could you help me how this is possible?

Thank you in advance.

Re: How to parse PHP string containing multiple PHP blocks?

PostPosted: September 10th, 2013, 2:13 am
by dbuerer
can you post an example of what you mean?

Re: How to parse PHP string containing multiple PHP blocks?

PostPosted: September 10th, 2013, 10:19 am
by Piedone
Wow that was a long time ago :-).

What I meant was the the ability to parse a string with PHP code that contains multiple PHP blocks like this:

<?php
blabla
?>
...
<?php
blabla
?>