note 68878 added to language.types.string

From: Date: Mon, 14 Aug 2006 18:36:32 +0000
Subject: note 68878 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-115898@lists.php.net to get a copy of this message
If you want to use Dreamweavers syntax highlighting features in HEREDOC variables you can do it like this: <?php $something = 'test'; $output = <<<EOFEOF <!-- ?> --> <table><tr><td>{$something}</td></tr></table> <!-- <?php --> EOFEOF; ?> Since you're in a HEREDOC, PHP will ignore the '<?php' and '?>' symbols and include them literally in the string, and the user's browser will ignore them because they're in HTML comments, but Dreamweaver will think you're breaking out of the PHP script and assume the string is HTML. Yay! Syntax highlighting in HEREDOCs! ---- Server IP: 216.194.113.175 Probable Submitter: 69.87.138.148 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.types.string.php Edit -- https://master.php.net/note/edit/68878 Del: integrated -- https://master.php.net/note/delete/68878/integrated Del: useless -- https://master.php.net/note/delete/68878/useless Del: bad code -- https://master.php.net/note/delete/68878/bad+code Del: spam -- https://master.php.net/note/delete/68878/spam Del: non-english -- https://master.php.net/note/delete/68878/non-english Del: in docs -- https://master.php.net/note/delete/68878/in+docs Del: other reasons-- https://master.php.net/note/delete/68878 Reject -- https://master.php.net/note/reject/68878 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115898) next »