"PHP print()"의 두 판 사이의 차이

 
28번째 줄: 28번째 줄:
</syntaxhighlight>
</syntaxhighlight>


==echo와 차이점 테스트==
==echo와 비교==
<syntaxhighlight lang='php' run>
<syntaxhighlight lang='php' run>
echo '안녕', '친구들';
echo '안녕', '친구들';
</syntaxhighlight>
<syntaxhighlight lang='php' run>
echo( '안녕', '친구들' );
</syntaxhighlight>
<syntaxhighlight lang='php' run>
print '안녕', '친구들';
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='php' run>
<syntaxhighlight lang='php' run>

2021년 3월 4일 (목) 14:48 기준 최신판

1 개요[ | ]

PHP print()
  • 문자열을 출력하는 PHP 함수
  • 파라미터를 1개만 받는다.
print "안녕 친구들";
print( "안녕 친구들" );
$str = "안녕 친구들";
print $str;
print( $str );
print "여러 줄
출력하기";
print "여러 줄\n출력하기";
print <<<END
여러 줄
출력하기
END;

2 echo와 비교[ | ]

echo '안녕', '친구들';
print( '안녕', '친구들' );

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}