php8.5
Home/ Manual/ xmlwriter / xmlwriter/ XMLWriter::text

XMLWriter::text

PHP function Edit on GitHub ✎

(PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL xmlwriter >= 0.1.0)

Write text

Description

Oop

XMLWriter::text(string $content): bool

Procedural

xmlwriter_text(XMLWriter $writer, string $content): bool

Writes a text.

Parameters

content

The contents of the text. The characters <, >, & and " are written as entity references (i.e. &lt;, &gt;, &amp; and &quot;, respectively). All other characters including ' are written literally. To write the special XML characters literally, or to write literal entity references, xmlwriter_write_raw() has to be used.

Return Values

Success

Changelog

VersionDescription

Source: reference/xmlwriter/xmlwriter/text.xml · from the official PHP manual (php/doc-en)