public function extractHashtags($str, $type = 'arr')
    {
        preg_match_all("/(#\w+)/", $str, $matches);
        $matches = $type == 'arr' ? $matches[0] : implode(', ', $matches[0]);
        return $matches;
    }
public function extractHashtags($str, $type = 'arr')
    {
        preg_match_all("/(#\w+)/", $str, $matches);
        $matches = $type == 'arr' ? $matches[0] : implode(', ', $matches[0]);
        return $matches;
    }
public function extractHashtags ( $ str , $ type = 'arr' ) { preg_match_all ( "/(#\w+)/" , $ str , $ matches ) ; $ matches = $ type == 'arr' ? $ matches [ 0 ] : implode ( ', ' , $ matches [ 0 ] ) ; return $ matches ; }
Extract hashtags from strings
@param  string $str
@param  string $type arr || str
@return mixed
Extract hashtags from strings