Hi this is probably really basic but cant do it for the life off me.
i have a foreach outputting values.
$tags = get_the_tags();
foreach($tags as $v) {
echo $v;
}
this will output
php,css,cms,seo
i need to put all those into a single variable so i can do the following.
$keywords = "<meta name='keywords' content='".$tags."'>";
return $keywords;
can someone help i have tried
$keywords = "<meta name='keywords' content='".foreach($tags as $v) {echo $v;}."'>";
return $keywords;
obviously getting errors from this and its wrong how is it done???
Thanks