1

I'm new to code igniter and I want to know how to use eval function in code igniter? When I try to use eval function in native php it works perfectly. But When I use the same code in code igniter it is throwing error.

eval("\$result = \"$jsonValues\";");

This is the error

syntax error, unexpected T_DNUMBER in C:\wamp\www\xxx\yyy\search.php(32) : eval()'d code on line 1

4

1 回答 1

2

You shouldn't use eval. But your code is failing because you aren't escaping the $ in $jsonValues

于 2013-05-22T07:50:15.237 回答