if ($type == 'url') { // standard URL hyperlink return "<a href=\"$rightlink\" target=\"_blank\">$text</a>"; }