1. 程式人生 > >字符串去重

字符串去重

rpo cdd bsp bst bsd nbsp strpos sdc bstr

$a3 = ‘absdcdeddefeffabcddefef<br/>‘;
$domain = strpos($a3, ‘def‘);
$t = substr($a3,$domain,3);
/* echo str_replace(‘def‘,‘‘,$a3).‘<br/>‘;
echo $domain.‘<br/>‘;
echo $t; */

while(strpos($a3, ‘def‘))
{
$a3 = str_replace(‘def‘,‘‘,$a3).‘<br/>‘;
}
echo $a3;

字符串去重