Function __global->xhtml_substr

Definitions

sources/xhtml.php

  • XHTML-aware substring extraction. Note that it will strip images, linebreaks, rules, etc - it's intended really for inline XHTML.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: string

Parameters

Name Type Default Set Range Description
$html string required parameter N/A N/A The text to perform on
$from integer required parameter N/A N/A The start position of the cut (HTML tags will be taken from before this though)
$length ?integer Null N/A N/A The length you want the concatenated text to be (null: go to end)
$literal_pos boolean False N/A N/A Whether to do a substr based on literal position in XHTML, rather than based on number of visible characters
$ellipses boolean False N/A N/A Whether to add ellipses
$grammar_completeness_tolerance float 0 N/A N/A A fraction of the length we may exceed by in order to maintain grammar tolerance (finish sentences, finish paragraphs, finish the whole thing)

Return

  • The result
  • Type: string
  • Set: N/A
  • Range: N/A