混水摸魚

[ PHP ] – 字串取代

<?php
echo str_replace('are','old are','how are you?');
?>

結果顯示:
how old are you?

參數說明:
str_replace(取代前的字串,取代後的字串,原本的字串);

Leave a Comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *