PHP_Framework

Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites

View the Project on GitHub

Syntax: theme_button(string $buttonText, [string $buttonLink, string $elementID])

Render a button using the primary button class.


Parameters

$buttonText
The text to display on the button

Optional $buttonLink
The link of the button. Can be a path or a URL. If not set, the link will be a sharp (‘#’);

Optional $elementID
The HTML ID and name of the button.


Return values

The HTML code for rendering a button using the btn-primary class with the specified text, link and ID.


Examples:

Print a button with the text Hello! that point to the example.org website
echo theme_button('Hello!', 'http://example.org/');

Print a button with the text Hello! that point to the hello page at root
echo theme_button('Hello!', '/hello');