Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 4th August 2023 15:35 Europe/London time based on the source file dated 4th July 2023 09:35 Europe/London time.