Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_inner_html_from_tag()

Description

Helper function to quickly return the inner HTML of a specific tag element from a DOM document.
Example usage:
get_inner_html_from_tag(strip_tags_and_attributes($unsafe_html), "p");


requested the wrong tag.

Parameters

ColumnTypeDefaultDescription
$txt string HTML string
$tag string DOM document tag element (e.g a, div, p)

Return

string Returns the inner HTML of the first tag requested and found. Returns empty string if caller code

This article was last updated 18th January 2021 09:35 Europe/London time based on the source file dated 15th January 2021 13:05 Europe/London time.