这样的数组为何不能输出
print_r (array('1','2','3'));
输出没问题Array ( [0] => 1 [1] => 2 [2] => 3 )
$data = "'1','2','3'";
print_r (array($data));
输出却是这样Array ( [0] => '1','2','3' )
要输出像这面一样,从一个变量赋值进去要怎么做才对,
------解决方案--------------------$data = "'1','2','3'";
print_r(eval("return array($data);"));
或
$data = "'1','2','3'";
$f = create_function('',"return array($data);");
print_r($f());