Welcome Guest, Not a member yet? Register   Sign In
Executing php from DB output
#10

[eluser]Michael Roper[/eluser]
Michael, you mention using eval() to parse the db content, but at what point would you do that?

In my model or my view, if I do something like the following:
Code:
//$data['content'] = $row['body']; <- thats what i usually just do
$data['content'] = eval($row['body']);
I get an error like this, even if there is no php tags in the db content:
Code:
Parse error: syntax error, unexpected '<' in C:\www\application\views\main.php(43) : eval()'d code on line 1
Am I using eval() wrong here?


Messages In This Thread
Executing php from DB output - by El Forum - 09-25-2007, 03:49 PM
Executing php from DB output - by El Forum - 09-25-2007, 04:00 PM
Executing php from DB output - by El Forum - 09-25-2007, 04:15 PM
Executing php from DB output - by El Forum - 10-01-2007, 11:30 AM
Executing php from DB output - by El Forum - 10-01-2007, 11:55 AM
Executing php from DB output - by El Forum - 10-02-2007, 03:35 PM
Executing php from DB output - by El Forum - 10-03-2007, 01:48 AM
Executing php from DB output - by El Forum - 10-04-2007, 03:19 PM
Executing php from DB output - by El Forum - 10-04-2007, 03:33 PM
Executing php from DB output - by El Forum - 10-04-2007, 07:54 PM
Executing php from DB output - by El Forum - 10-07-2007, 07:17 PM
Executing php from DB output - by El Forum - 10-07-2007, 08:22 PM
Executing php from DB output - by El Forum - 10-09-2007, 11:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB