Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PHPでテキストから単語を抽出するにはどうすればよいですか? または例として、次の文字列があります。 this is a long text string where it is written something
this is a long text string where it is written something
入手したい:
this is long text string where it is written something
PHPマニュアルを見てくださいexplode
explode
http://php.net/manual/en/function.explode.php
スペースで爆発する' 'と、希望する結果が得られます。
' '
組み込み関数を試すことができますexplode
$string='this is a long text string where it is written something'; $output = explode(" ", $string); var_dump($output);
必要な結果が表示されます