24h購物| | PChome| 登入
2023-10-11 09:40:17| 人氣1| 回應0 | 上一篇 | 下一篇
推薦 0 收藏 0 轉貼0 訂閱站台

PHP廢棄函數ereg_replace(),如何用preg_

網站架設ereg_replace()是個使用正則的replacestr_replace()
ereg_replace ( string $pattern , string $replacement , string $string ) : string
preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit = -1 [, int &$count ]] ) : mixed
preg_replace()是目前的推薦方案,必選參數3個,可選參數3個。基本上可以覆蓋 只不過是參數的具體用法不同。返回值是基本上一致的。網站架設ereg_replace()
 網站架設
1.png

文章出處

網站架設

台長: henryng3

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文