Collections functions
General functions
Render functions
Theme permission 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 30th September 2022 16:35 Europe/London time based on the source file dated 15th September 2022 15:40 Europe/London time.