Availability: >= 3.0

Type: Object Method

Description: Cuts an HTML string to the desired character length and closes any tags left open at the cut point.


string $html wproUtilities::cutHTMLstring $htmlint $length [, string $cut] );


The function returns the HTML cut to the desired length, with $cut added to the end and all open tags closed.

The html code to cut.

The length to cut the HTML code to.  The length does not include any HTML tags, it should be the length of text to cut the HTML to.

An optional string to append to the end of the cut HTML code.


$snippet wproUtilities::cutHTML$html100'...' );

This function is useful for showing article summaries on a news or blog page.