note 95554 added to domdocument.createprocessinginstruction
| From: | miaseye at gmail dot com | Date: | Fri, 08 Jan 2010 17:50:55 +0000 |
| Subject: | note 95554 added to domdocument.createprocessinginstruction | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164792@lists.php.net to get a copy of this message | ||
Hello,
Referring to below comment, I think it would be possible to use this method in order to add, for
example, some PHP code in your XHTML document with the DOM. Note that PHP code is processing
instruction from the XHTML document point of view. What's your opinion ?
<?php
// Create document.
$xhtml = new DOMDocument( "1.0", "ISO-8859-15" );
// Create php code processing instruction line
$php = $xhtml->createProcessingInstruction('php', '
// some php code
');
// Append to document
$xhtml->appendChild($php);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 81.57.139.130
----
Manual Page -- http://www.php.net/manual/en/domdocument.createprocessinginstruction.php
Edit -- https://master.php.net/note/edit/95554
Del: integrated -- https://master.php.net/note/delete/95554/integrated
Del: useless -- https://master.php.net/note/delete/95554/useless
Del: bad code -- https://master.php.net/note/delete/95554/bad+code
Del: spam -- https://master.php.net/note/delete/95554/spam
Del: non-english -- https://master.php.net/note/delete/95554/non-english
Del: in docs -- https://master.php.net/note/delete/95554/in+docs
Del: other reasons-- https://master.php.net/note/delete/95554
Reject -- https://master.php.net/note/reject/95554
Search -- https://master.php.net/manage/user-notes.php