wp_html_split

Separate HTML elements and comments from the text.

Description

(array) wp_html_split( (string) $input ); 

Returns (array)

The formatted text.

Parameters (1)

0. $input (string)
The text which has to be formatted.

Usage

  1. if ( !function_exists( 'wp_html_split' ) ) { 
  2. require_once ABSPATH . WPINC . '/formatting.php'; 
  3.  
  4. // The text which has to be formatted. 
  5. $input = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_html_split($input); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/formatting.php  
  1. function wp_html_split( $input ) { 
  2. return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );