单引号为边界的
'What\'s your name? said:"loveyou"'
双引号为边界的
"What's your name? said:\"loveyou\""
双引号为边界的中代美元符号的
"What's your name? said:\"love\$\""
'What\'s your name? said:"loveyou"'
双引号为边界的
"What's your name? said:\"loveyou\""
双引号为边界的中代美元符号的
"What's your name? said:\"love\$\""
所以如果你双引号中用$符号的话需要\$转义,
以使PHP不把它当作变量的开始字符,
否则PHP会产生个Notice级的错误!
很麻烦,容易搞错。所以php引入了“<<<”
就是它的结束标签必须是在行的最开始,
代码缩进本来挺好看的,但是遇到它我就不心情了!
<?php
if($level == 2)
{
$onMouseOut = "onMouseOut="."\""."this.className ="."'mDefault'"."\"";
$onMouseOver = "onMouseOver="."\""."this.className ="."'mOver'"."\"";
$class = "class='mDefault'";
$gotoURL = "MM_goToURL("."'parent.frames[\'bottomFrame\']'".",'frame_Service.php');";
$showHideLayers = "MM_showHideLayers('Layer1','','show','Layer4','','hide','Layer5','','hide',
'Layer6','','hide');";
$returnValue = 'return document.MM_returnValue"';
echo '<td width=98 background="images_zyxel/i_05.jpg"><div id=M5>';
echo '<table width=98 height=58 border=0 cellpadding=0 cellspacing=0
onClick="'.$gotoURL.$showHideLayers.$returnValue.$onMouseOut.$onMouseOver.$class.">";
echo '<tr>
<td height=30> </td>
</tr>
<tr>
<td align="center"><span class="style11">Service Manager</span></td>
</tr>
</table>
</div></td>
<td width=3>
<img src="images_zyxel/line.jpg" width="3" height="58">
</td>
</tr>
</table>
</div>
</td>';
}
?>