我是php的新手。我的问题是,我想用%20
-
答案 0 :(得分:0)
MyObject
输出是:
<?php
$test1='exmple.com/dp/id/om%20Joan';
$test1=str_replace('%20','-',$test1);
echo $test1;
答案 1 :(得分:-1)
$myUrl = 'www.somesite.com/in here/';
$cleanUrl = str_replace('/\\s/', '-', $myUrl);
结果:
$cleanUrl = 'www.somesite.com/in-here/';