$link = JHTML::_('link', 'http://www.example.com', 'Link Title');
$options = array('class' => 'my-class', 'target' => '_blank'); $link = JHTML::_('link', 'http://www.example.com', 'Link Title', $options);
$options = array('class' => 'my-class', 'target' => '_blank'); $icon = JHTML::_('image', 'my-icon.png', 'Icon Alt Text'); $link = JHTML::_('link', 'http://www.example.com', $icon . ' Link Title', $options);This will create a link with an icon on the left and the text "Link Title" on the right. Overall, JHTML Link is a convenient and flexible library for creating links in PHP.