php join函数应用_PHP教程
程序员文章站
2022-05-23 23:21: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);
上一篇: 解决MySQL中文乱码有关问题
下一篇: 大家伙儿说说Drupal