join应用!
时间:2011-03-29 来源:网宗
1 $key = array();
2 $val = array();
3 foreach ($_POST as $k=>$v)
4 {
5 $key[] = '`'.strip_tags(mysql_real_escape_string(trim($k))).'`';
6 $val[] = "'".strip_tags(mysql_real_escape_string(trim($v)))."'";
7 }
8
9 $keys = join(",",$key);
10 $vals = join(",",$val);
相关阅读 更多 +