il_random_html()

Generate placeholder HTML made up of a number of lorem ipsum paragraphs — useful for filling rich-text/HTML fields in test data.

Syntax

il_random_html(paragraphs)

Parameters

Name Type Required Description
paragraphs int yes How many <p> paragraphs to generate.

Returns

An HTML string.

Example

record_create("articles", ["body" => il_random_html(3)]);

Example output

<p>Lorem ipsum dolor sit amet ...</p>
<p>Consectetur adipiscing elit ...</p>
<p>Sed do eiusmod tempor ...</p>

Notes

  • For testing only.

See also: il_random_text()