php join函数应用_php技巧
程序员文章站
2022-05-25 13:50:26
...
复制代码 代码如下:
$key = array();
$val = array();
foreach ($_POST as $k=>$v)
{
$key[] = '`'.strip_tags(mysql_real_escape_string(trim($k))).'`';
$val[] = "'".strip_tags(mysql_real_escape_string(trim($v)))."'";
}
$keys = join(",",$key);
$vals = join(",",$val);
下一篇: Python中的字符串查找操作方法总结