标签:二维 class bsp str for 数组 val 维数 trim
$arr = array( array(‘id‘=>4,‘name‘=>‘ceshi4‘), array(‘id‘=>5,‘name‘=>‘ceshi5‘), array(‘id‘=>6,‘name‘=>‘ceshi6‘), ); foreach($arr as $v){ $valueStr .= "(".$v[‘id‘].",‘".$v[‘name‘]."‘),"; } $valueStr = rtrim($valueStr,‘,‘); $sql = "INSERT into `td_list`(id,name) values $valueStr";
标签:二维 class bsp str for 数组 val 维数 trim
原文地址:http://www.cnblogs.com/chenchenphp/p/6478708.html