摘要: $where = array();if(!empty($type)){ $where[] = " `type` = ".$type ;}if(!empty($price)){ $where[] = " `price` = ".$price ;}if(!empty($area)){ $where[] = " `area` = ".$area ;}if(!empty($where)){ $where = implode(' And ',$where); $sql = " SELECT * FROM `table` 阅读全文
posted @ 2013-04-11 21:15 不负韶华668 阅读(215) 评论(0) 推荐(0) 编辑
摘要: $str="我叫aaa@我是aa@bb @ddd http://www.weibo.com";//找到@的位置$index=intval(mb_strpos($str,'@'));//取@之后的字符串$res=trim(mb_substr($str,$index));$res=explode('@',$res);foreach($res as $val){ $val=trim($val); //过滤空格及多余的字符 if(!empty($val)){ if(strpos($val,' ')!==false){ $str1=ex 阅读全文
posted @ 2013-04-11 14:09 不负韶华668 阅读(163) 评论(0) 推荐(0) 编辑