Answers for "remove last comma from a list wordpress"

0

remove last comma from a list wordpress

$posttags = get_the_tags();
    if ($posttags) {
       $taglist = "";
       foreach($posttags as $tag) {
           $taglist .=  $tag->name . ', '; 
       }
      echo rtrim($taglist, ", ");
   }
Posted by: Guest on November-18-2020

Code answers related to "remove last comma from a list wordpress"

Browse Popular Code Answers by Language