title: preg_match foreach
body: <p>So I am using a preg_match to get any text after a # up until a space out of a string. However if there are multiple occasions of it in the string it will only return the first one. This is what I have so far</p>
  
  <pre><code>$text = '#demo1 #demo2 some text #blah2';
  $check_hash = preg_match("/([#][a-zA-Z-0-9]+)/", $text, $hashtweet);
  foreach ($hashtweet as $ht){
  echo $ht;
  }
  </code></pre>
  
  <p>The <code>echo $ht;</code> outputs <code>#demo1#demo1</code> when it should output all 3 of the words with # in front. Any help is greatly appreciated.</p>