implode()

PHP implode() 函数

实例

把数组元素组合为字符串:

<?php
  $conditions[] = "userId=" . $userid;
  $conditions[] = "(regTime BETWEEN ".$_starttime." AND ".$_endtime.")";
  $where = implode(" AND ", $conditions);   print_r($where); ?>

string(78) "userId=22595 AND (regTime BETWEEN 2017-10-04 00:00:00 AND 2017-10-02 23:59:59)"

posted on 2017-10-11 14:56  新手报道  阅读(119)  评论(0编辑  收藏  举报

导航