Replace string in an array with PHP

后端 未结 6 619
傲寒
傲寒 2020-12-09 17:57

How can I replace a sub string with some other string for all items of an array in PHP?

I don\'t want to use a loop to do it. Is there a predefined function in PHP t

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-09 18:54

    function my_replace_array($array,$key,$val){
        for($i=0;$i

提交回复
热议问题