bold (function)

Last updated: Fri, Apr 14, 2023 3:41 pm
Return to Knowledgebase

Purpose

Puts a bold message at the top of a page

Location

users/helpers/helpers.php

See Also:

err (function)

Parameters

# Parameter Data Type Required Description
1 $text string Yes 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:

Welcome to my website