欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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);

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/323208.htmlTechArticle复制代码 代码如下: $key = array(); $val = array(); foreach ($_POST as $k=$v) { $key[] = '`'.strip_tags(mysql_real_escape_string(trim($k))).'`'; $val[] = "'".strip_tags(mysq...