PHP removing a character in a string

前端 未结 4 2103
太阳男子
太阳男子 2020-12-15 15:37

My php is weak and I\'m trying to change this string:

http://www.example.com/backend.php?/c=crud&m=index&t=care
                                   ^
         


        
4条回答
  •  無奈伤痛
    2020-12-15 15:46

    $str = preg_replace('/\?\//', '?', $str);
    

    Edit: See CMS' answer. It's late, I should know better.

提交回复
热议问题