Have trouble when using heredoc syntax in PHP
Posted
by wamp
on Stack Overflow
See other posts from Stack Overflow
or by wamp
Published on 2010-06-10T02:56:00Z
Indexed on
2010/06/10
3:02 UTC
Read the original article
Hit count: 272
<?php
$output = <<< END
<table style="display: table;" class="listview rowstyle-rowhighlight" id="resourcegrid">
<thead>
<tr>
<th width="70"></th>
<th style="-moz-user-select: none;" class="sortable fd-column-0"><a class="fdTableSortTrigger" href="#">Name</a></th>
<th style="-moz-user-select: none;" class="sortable fd-column-1"><a class="fdTableSortTrigger" href="#">Contributor</a></th>
<th style="-moz-user-select: none;" class="sortable fd-column-3"><a class="fdTableSortTrigger" href="#">Modified</a></th>
</tr>
</thead><tbody>
END;
echo $output;
When I run it reports :
Parse error: parse error on line 2
But I don't see anything abnormal.
© Stack Overflow or respective owner