我有这个:
$text = $_POST['text'];
当echo $text
我得到这个时:
ggg #hhh #ddd ggg hhhrr ggg #ttt
当我这样做时:
$val = preg_match_all("/#\w+/", $text, $matches);
print_r($matches);
我明白了
Array ( [0] => Array ( [0] => #hhh [1] => #ddd [2] => #ttt ) )
但我想要这样的输出:
Array ( [0] => #hhh [1] => #ddd [2] => #ttt )
谢谢