Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Gábor Papp
Added: May 29, 2019 5:28 AM
Views: 12
Tags: no tags
  1. preg_match_all("/(#\w+)/u", $one['message'], $matches);
  2.     // print('<pre>');print_r($matches);print('</pre>');
  3.     $tagsstring='';
  4.     if(!empty($matches[0])) {
  5.         $tagsstring=';';
  6.         foreach($matches[0] as $tag) {
  7.             // $data["data"][$k]['tags'][] = $tag;
  8.             $tag=str_replace('#','',$tag);
  9.             // echo '• tag '.$tag.'<br />';
  10.             $tagsstring.=$tag.';';
  11.         }
  12.     }