The function takes one parameter: $text, which is the text to be formatted as a heading.
Returns
Data Type
Description of Returned Data
other
The result is echoed, not returned.
Example
bold("This message is bold");
Further Documentation:
The function echoes an HTML string that contains the formatted heading. The HTML string includes the following elements:
A tex> tag that sets a padding of 1em and an alignment of center for the contained text.
An h4 tag that sets the text size and style as a heading level 4.
A span tag that sets the background color to white for the contained text.
The function echoes the $text parameter as the content of the formatted heading.
$heading_text = 'Welcome to my website';
bold($heading_text);
In this example, the bold() function is called with the $heading_text variable as the parameter. The function outputs an HTML string that displays the $heading_text as a centered and bolded heading level 4 with a white background. The output will look something like this: