tags as $t) { if($t->type == $type) { return $t->name; } } } }