-1
可能重複:
How can I convert ereg expressions to preg in PHP?PHP:棄用EREG_REPLACE到的preg_replace
什麼是preg_replace函數這個EREG_REPLACE功能的相同呢?
$html = ereg_replace("[^[email protected] ]"," ",$html);
可能重複:
How can I convert ereg expressions to preg in PHP?PHP:棄用EREG_REPLACE到的preg_replace
什麼是preg_replace函數這個EREG_REPLACE功能的相同呢?
$html = ereg_replace("[^[email protected] ]"," ",$html);
$html = preg_replace("/[^[email protected] ]/"," ",$html);
最大的區別是在兩端的分隔符,儘管有其他人。閱讀here。
$html = preg_replace("/[^[email protected] ]/"," ",$html);