eval of array
Posted: Sun Dec 06, 2009 10:08 am
Hi All
I'm trying this:
and it gives me this:
Parse error: syntax error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dhlasash/public_html/crawler/test.php on line 56
Anybody knows why?
I'm trying this:
Code: Select all
for ($k=0; $k<$table_cols; $k++)
{
$v="\$arr$k[]=\$my_item$k;\n";
eval("$v");
}
Parse error: syntax error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dhlasash/public_html/crawler/test.php on line 56
Anybody knows why?