Ok so I want to run php that is in my mysql database i echo it but it prints the php and doesn't run what command would i use to make it check if there is any php in the code before displaying it.
[man]eval[/man]
why doesn't this work
if(mysql_num_rows($result2)>0){ while ($row = mysql_fetch_array($result2)) { eval("$row;"); echo '<p>' . $row['body'] . '</p>';
i assume that the "body" is a string that contains PHP code?
if(mysql_num_rows($result2) > 0) { while ($row = mysql_fetch_assoc($result2)) { eval('?>' . $row['body']); } }
thanks what does the ?> do?