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 21st April 2021 17:35 Europe/London time based on the source file dated 20th April 2021 21:30 Europe/London time.