foreach($val['tags'] as $tags) {
if (is_array($tags) || is_object($tags)){
print $tags['value'];
}
}
$tags_result = 'тег, тег2, тег3';
$tags = array_column($val["tags"], "value");
echo implode(',', $tags);