Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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.