Replacing specified double quotes in text with preg_replace

后端 未结 1 878
误落风尘
误落风尘 2021-01-27 01:57

I have got a serialized array, and I need to replace double quotes in all places like this:

...s:30:\"test \"is\" & test\";...

to



        
相关标签:
1条回答
  • 2021-01-27 02:16

    Try

    preg_replace("/([^:])(\")([^;:])+/isU","$1"$3",$arr);
    
    0 讨论(0)
提交回复
热议问题