Bat*_*man 1 php wordpress split title
例如,我有标题"战舰预告片",因此它将生成像这样的"最佳,玩家,世界"的关键字,我该怎么办呢?
我希望像这样的html apear ...
First:The
Second:Battleship
Third:Trailer
<meta name="keywords" content="<FirstWord>,<second>,<third>"/>
Run Code Online (Sandbox Code Playgroud)
更确切地说,我想用文字分割标题.
我使用Wordpress
echo '<meta name="keywords" content="'.implode(',', explode(' ', $string)).'"/>';
Run Code Online (Sandbox Code Playgroud)
这会将空格分隔的单词$string
与逗号连接起来.显然要替换$string
正确的变量.