// 正确的写法
$arr = array('name'=>'poly');
$sql = "select * from '{$arr['name']}'";
var_dump($sql);
//错误的写法
$arr = array('name'=>'poly');
$sql = "select * from $arr['name']";
var_dump($sql);
// 正确的写法
$arr = array('name'=>'poly');
$sql = "select * from '{$arr['name']}'";
var_dump($sql);
//错误的写法
$arr = array('name'=>'poly');
$sql = "select * from $arr['name']";
var_dump($sql);