title: select multi numbers of words after @ sign from using php
body: <p>yesterday i asked a question that how to select specific word from string which is having @ sign with it.
  someone told me this solution </p>
  
  <pre><code>$abc = "hello @john what are you doing";
  $found = preg_match('/@([^-\s]*)/', $abc, $matches);
  
      $name = null;
      if ($found) {
        $name = $matches[1];
      }
  </code></pre>
  
  <p>it works like a charm but the problem is it only select first word with @ sign if the string have alot of words like that. so now i need a loop which selects all the words in string which are having @ sign with them.</p>