PDA

View Full Version : Capturing data between <?php & ?>


bauhsoj
10-25-2005, 11:24 PM
Is it possible to do something similar to the following?

$variable = ?>
<div>some HTML</div>
<p style="<?=$user_style ?>">more HTML</p>
<font>yet more HTML</font>
<?php
;


Basically, I want to be able to easily layout HTML code and still be able to capture it into a string without having to worry about escaping quotes or double quotes, etc.

bcarl314
10-25-2005, 11:43 PM
Does the heredoc syntax work??



$string = <<<STRING
<html>blah blah blah{$hello}</html>

STRING;

bauhsoj
10-28-2005, 02:50 AM
Does the heredoc syntax work??

Completely forgot about heredoc!:p :thumbsup: