note 93325 added to language.types.string
| From: | Liesbeth at osu1 dot php dot net | Date: | Thu, 03 Sep 2009 08:54:58 +0000 |
| Subject: | note 93325 added to language.types.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160186@lists.php.net to get a copy of this message | ||
If you need to emulate a nowdoc in PHP < 5.3, try using HTML mode and output capturing. This way
'$' or '\n' in your string won't be a problem anymore (but unfortunately,
'<?' will be).
<?php
// Start of script
ob_start(); ?>
A text with 'quotes'
and $$$dollars$$$.
<?php $input = ob_get_contents(); ob_end_clean();
// Do what you want with $input
echo "<pre>" . $input . "</pre>";
?>
----
Server IP: 83.137.20.135
Probable Submitter: 82.161.85.217
----
Manual Page -- http://www.php.net/manual/en/language.types.string.php
Edit -- https://master.php.net/note/edit/93325
Del: integrated -- https://master.php.net/note/delete/93325/integrated
Del: useless -- https://master.php.net/note/delete/93325/useless
Del: bad code -- https://master.php.net/note/delete/93325/bad+code
Del: spam -- https://master.php.net/note/delete/93325/spam
Del: non-english -- https://master.php.net/note/delete/93325/non-english
Del: in docs -- https://master.php.net/note/delete/93325/in+docs
Del: other reasons-- https://master.php.net/note/delete/93325
Reject -- https://master.php.net/note/reject/93325
Search -- https://master.php.net/manage/user-notes.php