PHP str_replace()
mixed str_replace ( mixed $search , mixed $replace , mixed \(subject [, int &\)count ] )
該函數返回一個字符串或者數組。該字符串或數組是將 subject 中全部的 search 都被 replace 替換之后的結果。
如果沒有一些特殊的替換需求(比如正則表達式),你應該使用該函數替換 ereg_replace() 和 preg_replace()。
$arr = array("str_1","str_2","str_3");
echo str_replace("'","'",$arr); \\ array('str_1','str_2','str_3');