我需要你的帮助。我有一个变量名$thetextstring,其中包含 9 个单词,用 LINE BREAKS 和 SPACES 分隔,我从 html 表单中获取。
$thetextstring = "alpha bravo charlie
delta echo
foxtrot
golf hotel india" ;
如何标记 php 字符串 $thetextstring 以删除行和空格并将 9 个单词放在这样的数组中
$thetextarray[0] = "alpha";
$thetextarray[1] = "bravo";
$thetextarray[2] = "charlie";
$thetextarray[3] = "delta";
$thetextarray[4] = "echo";
$thetextarray[5] = "foxtrot";
$thetextarray[6] = "golf";
$thetextarray[7] = "hotel";
$thetextarray[8] = "india";
我需要 php 代码来处理这个问题。非常感谢您!