I have this:
$text = $_POST['text'];
When I echo $text
I get this:
ggg #hhh #ddd ggg hhhrr ggg #ttt
When I do this:
$val = preg_match_all("/#\w+/", $text, $matches);
print_r($matches);
I get
Array ( [0] => Array ( [0] => #hhh [1] => #ddd [2] => #ttt ) )
But I want output like this:
Array ( [0] => #hhh [1] => #ddd [2] => #ttt )
thanks