note 62291 deleted from language.types.string by mazzanet

From: Date: Fri, 24 Feb 2006 08:46:44 +0000
Subject: note 62291 deleted from language.types.string by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-104359@lists.php.net to get a copy of this message
Note Submitter: ThePromenader ---- The Heredoc (<<<) syntax could be a solution to a problem I had, but it has a bit of a 'bug' (most probably because it was not intended to be used in the way I did). In switching a site from HTML to PHP, I wanted to transform blocks of text, in retaining their WYSWYG editor 'editibility,' into a variable that would be called in a template itself called later in the page, in a form something like this: <?php $content = <<<CONTENT ?> <table width="100%"> <tr> <td> Hominy hominy hominy hominy... </td> </tr> </table> <?php CONTENT; ?> ...this works, but with one minor glitch: there appears at the beginning, before the <table>, an extra "?>".

« previous php.notes (#104359) next »