我需要在字符串内部发生之前删除任何字符串中的所有字符:
"www/audio"
Run Code Online (Sandbox Code Playgroud)
不知道我怎么做到这一点.
xda*_*azz 151
您可以使用strstr执行此操作.
echo strstr($str, 'www/audio');
Run Code Online (Sandbox Code Playgroud)
Waz*_*azy 18
考虑到
$string="We have www/audio path where the audio files are stored"; //Considering the string like this
Run Code Online (Sandbox Code Playgroud)
要么你可以使用
strstr($string, 'www/audio');
Run Code Online (Sandbox Code Playgroud)
要么
$expStr=explode("www/audio",$string);
$resultString="www/audio".$expStr[1];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
102595 次 |
| 最近记录: |