text_to_paragraphs

Text-related functions

Summary

text_to_paragraphs(string $str)

Replace new lines in a block of text with paragraph tags.

Looks for 2 consecutive line breaks resembling a paragraph break and wrapseach of the paragraphs with a <p> tag. If no paragraphs are found, then theoriginal text will be wrapped with line breaks.

Parameters:
  • $str (string) –
Returns:

string

Usage

Examples

See Also

Project Versions

Table Of Contents

Previous topic

text_to_id

Next topic

url_to_link

This Page