例如:“我想我还有很长的路要走。”
在本例中,我希望输出
I 2
think 1
got 1
a 1
long 1
way 1
to 2
go 1
market 1
编码:
<?php
$tmp = explode (" ", $text);
echo "
My Words
Repetition
";
foreach ($tmp as $a)
{
echo "" $a."" ;
echo "" ;
}
echo ""
?>
1条答案
按热度按时间gfttwv5a1#
您可以尝试使用