PHP 删除特定字符串之前的所有字符
我需要在字符串内出现这种情况之前从任何字符串中删除所有字符:
"www/audio"
不知道我该怎么做。
我需要在字符串内出现这种情况之前从任何字符串中删除所有字符:
"www/audio"
不知道我该怎么做。
考虑到
$string="We have www/audio path where the audio files are stored"; //Considering the string like this
您可以使用
strstr($string, 'www/audio');
或
$expStr=explode("www/audio",$string);
$resultString="www/audio".$expStr[1];