diff --git a/reference/xmlwriter/functions/xmlwriter-write-attribute.xml b/reference/xmlwriter/functions/xmlwriter-write-attribute.xml
index f1944a12ea..48e0ea048f 100644
--- a/reference/xmlwriter/functions/xmlwriter-write-attribute.xml
+++ b/reference/xmlwriter/functions/xmlwriter-write-attribute.xml
@@ -58,6 +58,40 @@
+
+ &reftitle.examples;
+
+ Intermixing Sub-elements and Attributes
+
+ If writing sub-elements and attributes is intermixed, any attempt to write
+ attributes after the first sub-element will fail and return false.
+
+
+openMemory();
+
+$xml->startElement('element');
+$xml->writeAttribute('attr1', '0');
+$xml->writeElement('subelem', '0');
+var_dump($xml->writeAttribute('attr2', '0'));
+$xml->endElement();
+
+echo $xml->flush();
+?>
+]]>
+
+ &example.outputs;
+
+0
+]]>
+
+
+
+
&reftitle.seealso;