PHP REGEX: Problem with Smiley `:)` and `:))`

前端 未结 4 1082
别跟我提以往
别跟我提以往 2021-01-14 15:22

What I want


Hi! I want to replace :) to smile.png and :)) to laugh.png.

Th

4条回答
  •  无人及你
    2021-01-14 15:50

    str_replace(array(":))", ":)"), array("laugh.png", "smile.png"), $string);
    

    The order is important.

提交回复
热议问题