Home > Backend Development > PHP Tutorial > preg_replace() 乱码,该怎么处理

preg_replace() 乱码,该怎么处理

WBOY
Release: 2016-06-13 12:15:50
Original
1799 people have browsed it

preg_replace() 乱码

<br />$search_input=$_REQUEST["search_input"];<br />$search_input = preg_replace('/\s(?=\s)/','', $search_input);<br />$search_array=explode(" ",$search_input);<br /><br />	if (is_array($search_array)){<br />		$search_array=implode("|",$search_array);<br />	}<br />	$clientNumber=preg_replace("/($search_array)/i","<font style='color:#aa1234'>\\1</font>",$clientNumber);<br />	$clientTime=preg_replace("/($search_array)/i","<font style='color:#aa1234'>\\1</font>",$clientTime);<br /><br /><br /><br />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>";<br />
Copy after login

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

问题:
1.直接查询后无问题但点击页码就会出现乱码现象.
------解决思路----------------------
连原始数据都不给,哭也没有用!

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