Welcome Guest, Not a member yet? Register   Sign In
How to execute php in string?
#1

[eluser]rogierb[/eluser]
Hi all,

I think my brain froze since I'm unable to get a decent solution to this problem...

Problem:
Somehow I'm stuck with a very large string which holds PHP code:

Code:
$string = "a lot of text <php if($blah ==$blah$blah) { echo $dosomething} ?&gt; an yet another text"

echo $string // does not work, go figure

How do I execute the code within the string?

I even tried:
Code:
ob_start();
echo $string ;
contents = ob_get_contents();
ob_end_clean();
          
return $contents;

Even tried putting my head in the oven, still no luck...

So anyone...help...


Messages In This Thread
How to execute php in string? - by El Forum - 01-28-2008, 08:11 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:17 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:21 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:23 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:25 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:30 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:37 AM
How to execute php in string? - by El Forum - 01-28-2008, 08:47 AM
How to execute php in string? - by El Forum - 01-28-2008, 09:04 AM
How to execute php in string? - by El Forum - 01-28-2008, 09:26 AM
How to execute php in string? - by El Forum - 01-28-2008, 09:38 AM
How to execute php in string? - by El Forum - 01-28-2008, 10:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB