Home > Backend Development > PHP Tutorial > preg_replace() 乱码

preg_replace() 乱码

WBOY
Release: 2016-06-23 13:39:34
Original
1412 people have browsed it

$search_input=$_REQUEST["search_input"];$search_input = preg_replace('/\s(?=\s)/','', $search_input);$search_array=explode(" ",$search_input);	if (is_array($search_array)){		$search_array=implode("|",$search_array);	}	$clientNumber=preg_replace("/($search_array)/i","<font style='color:#aa1234'>\\1</font>",$clientNumber);	$clientTime=preg_replace("/($search_array)/i","<font style='color:#aa1234'>\\1</font>",$clientTime);echo "<div id='page_list_$i' class='page_default' url='./client_list.php?page=$i&search_list=$search_list&search_input=$search_input'>$i</div>";
Copy after login

描述:
1.FF下无问题,IE6+应该都有问题
2.$search_input 不止一条数据可以空格拆分多个
3.页码为循环输出

问题:
1.直接查询后无问题但点击页码就会出现乱码现象.


回复讨论(解决方案)

有遇到过的么》??

连原始数据都不给,哭也没有用!

encodeURL();
解决中文乱码问题。

回复 结贴。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template