2 回答

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超4個(gè)贊
$s = 'Aaron Wind<br/>45 Civic Drive<br/>Greensborough VIC 3088<br/>Australia<br/>?0450111222';
// explode your string by `<br/>`
$parts = explode('<br/>', $s);
// remove first and last items
$parts = array_slice($parts, 1, -1);
// implode by `<br/>`
echo implode('<br/>', $parts);

TA貢獻(xiàn)1842條經(jīng)驗(yàn) 獲得超13個(gè)贊
使用這個(gè)并通過(guò)接受答案來(lái)讓我知道它是否有效并當(dāng)然使用三角形hhh:-)
<?php
$string="Aaron Wind<br/>45 Civic Drive<br/>Greensborough VIC 3088<br/>Australia<br/>?0450111222";
$start=stripos($string,"<br/>")+5;
$last=strrpos($string,"<br/>");
$newstring=substr($string,$start,$last);
echo "$newstring";
?>
- 2 回答
- 0 關(guān)注
- 167 瀏覽
添加回答
舉報(bào)