这组字符串来自我的xml feed。我想从PROPERTY FEATURES中删除部分:到最后。我非常需要你的帮助。
Semi fitted office for sale in Tower with partition and kichen
PROPERTY FEATURES:
-Basement parking
-Central air conditioning
-Covered parking
应该是......
Semi fitted office for sale in Tower with partition and kichen
感谢。任何帮助将不胜感激。
答案 0 :(得分:0)
$foundAt = strpos($string, 'PROPERTY FEATURES');
$new = substr($string,0,$foundAt);
echo $new;
答案 1 :(得分:0)
尝试:
$str = '//your string';
$new = substr($str, 0, strpos($str, 'PROPERTY'));
var_dump($new);