数组中的PHP注释?
我试图注释掉php函数内以下代码中~/*********/~之间的代码段:数组中的PHP注释?,php,arrays,comments,Php,Arrays,Comments,我试图注释掉php函数内以下代码中~/*********/~之间的代码段: $photobody[]="<tr><td colspan=\"".$cols."\"> <table width=\"100%\" border=\"0\"> <tr><td width=\"33%\"> <div align=\"left\" class=\"caption\">".$
$photobody[]="<tr><td colspan=\"".$cols."\">
<table width=\"100%\" border=\"0\">
<tr><td width=\"33%\">
<div align=\"left\" class=\"caption\">".$prev."</div></td>
<td width=\"33%\">
~/***** <div align=\"center\" class=\"caption\">Photos
<strong>".($photonum-(($rows*$cols)-1))."</strong> to
<strong>".$endnum."</strong> of
<strong>".count($photos)."</strong>
<br />".$photopage."</div> ****/~
</td><td width=\"33%\">
<div align=\"right\" class=\"caption\">".$next."</div></td></tr></table></td></tr>";
$photobody[]=”
“$prev。”
~/****照片
“($photonum-($rows*$cols)-1))。”至
“$endnum。”的
.count($photos)。“
“$photopage.”***/~
“$next。”;
有一些困难。我是否需要逃避一些事情,才能让那部分评论出来?没什么帮助。谢谢。您应该用一个额外的
“
关闭上一个字符串,以便/*
后面的文本成为注释:
"<td width=\"33%\">"
/***** <div align=\"center\" class=\"caption\">Photos
<strong>".($photonum-(($rows*$cols)-1))."</strong> to
<strong>".$endnum."</strong> of
<strong>".count($photos)."</strong>
<br />".$photopage."</div> ****/
"</td><td width=\"33%\">"
“”
/*****照片
“($photonum-($rows*$cols)-1))。”至
“$endnum。”的
.count($photos)。“
“$photopage。”****/
""
您想要注释的部分是纯HTML类型。因此,您需要放置HTML注释,如图所示:-
$photobody[]="<tr><td colspan=\"".$cols."\">
<table width=\"100%\" border=\"0\">
<tr><td width=\"33%\">
<div align=\"left\" class=\"caption\">".$prev."</div></td>
<td width=\"33%\">
<!-- <div align=\"center\" class=\"caption\">Photos
<strong>".($photonum-(($rows*$cols)-1))."</strong> to
<strong>".$endnum."</strong> of
<strong>".count($photos)."</strong>
<br />".$photopage."</div> -->
</td><td width=\"33%\">
<div align=\"right\" class=\"caption\">".$next."</div></td></tr></table></td></tr>";
$photobody[]=”
“$prev。”
“$next。”;
用于评论使用的
$photobody[]=”
“$prev。”
“$next。”在这里你可以得到一些帮助
$photobody[]="<tr><td colspan=\"".$cols."\">
<table width=\"100%\" border=\"0\">
<tr><td width=\"33%\">
<div align=\"left\" class=\"caption\">".$prev."</div></td>
<td width=\"33%\">
<!--<div align=\"center\" class=\"caption\">Photos
<strong>".($photonum-(($rows*$cols)-1))."</strong> to
<strong>".$endnum."</strong> of
<strong>".count($photos)."</strong>
<br />".$photopage."</div> -->
</td><td width=\"33%\">
<div align=\"right\" class=\"caption\">".$next."</div></td></tr></table></td></tr