0
如何從php中的文本中提取單詞? 或例子,我有這個字符串: this is a long text string where it is written something
如何從php中的文本中提取單詞
我想獲得:
this
is
long
text
string
where
it
is written
something
如何從php中的文本中提取單詞? 或例子,我有這個字符串: this is a long text string where it is written something
如何從php中的文本中提取單詞
我想獲得:
this
is
long
text
string
where
it
is written
something
你可以試試內置函數explode
$string='this is a long text string where it is written something';
$output = explode(" ", $string);
var_dump($output);
它會告訴你需要的結果
是'被written'在一行只是一個錯字? – zerkms
我假設你想在輸出中輸入'a'? –