我的eval代碼中的問題在哪裏? 因爲Apache說:在eval()中解析錯誤 - eval()'d代碼
Parse error: syntax error, unexpected T_STRING in E:\xampp\htdocs\1php\mas_res\inc\mysql_class.php(120) : eval()'d code on line 1
我的代碼:
$type1 = "row";
$query1 = mysql_query("SELECT * FROM table");
$textToEval = "mysql_fetch_{$type1}($query1);";
$query = eval($textToEval);
什麼是正確的模式?
謝謝..
回顯出你的`$ textToEval`,並將它添加到你的問題中。 – jondavidjohn 2011-02-01 19:09:03