Home  >  Article  >  Backend Development  >  语句拼装有关问题

语句拼装有关问题

WBOY
WBOYOriginal
2016-06-13 13:42:43808browse

语句拼装问题
echo ''.$nick.'
';


这个语句输出有问题,应该是拼装问题,

求正确拼装方式,如果有关于这类语句拼装问题的帖子,请推荐一下,3Q。


------解决方案--------------------
注意转义符的使用

$nick='test';
echo ''.$nick.'
';

或者

$nick='test';
echo $nick

html;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn