setText('Click me'); $button->setLink('http://example.com'); echo $button->render(); ?>
setText('Buy Now'); $button->setLink('http://example.com'); $button->setStyle([ 'color' => '#fff', 'background-color' => '#007bff', 'padding' => '10px 15px', 'border-radius' => '5px', 'text-decoration' => 'none', ]); echo $button->render(); ?>In this example, we create a LinkButton with the text "Buy Now" and a link to "http://example.com". We also customize its style with the setStyle() method, which takes an array of CSS styles as its argument. Overall, the LinkButton library is a useful tool for web developers who need to add clickable links to their web pages. It is easy to use and can be customized to fit your specific needs.