$article = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce euismod tempor velit."; $section = getSection($article, 0, 20); echo $section;
$article = "This code example retrieves the 12 characters of the text within the first paragraph tag of the article variable and displays it as output. The last parameter of the function "true" indicates that HTML tags should be preserved in the output. This function is commonly found in the PHP String library.Heading
This is a paragraph.
"; $section = getSection($article, 1, 12, true); echo $section;