In general, the dynamic output of HTML content in PHP is achieved through print and ECHO statements, and in practice, both print and ECHO functions are almost identical. It can be said that there is a place to use, and the other can be used. However,
{Code...} if it only requires the value of $ url, why cannot it be referenced directly instead of using the echo statement? In my opinion, echo is only output to the upper layer. If it is output to the display at the outermost layer, it is output to
This article introduces to you about the PHP5 in the Echo statement and print statements are different, there is a certain reference value, the need for friends can refer to, I hope to help you.
PHP Echo and Print statements
Echo and Print
The difference between echo and print in PHP is phpechoprint. The difference between echo and print in PHP. In general, PHP dynamically outputs HTML content through print and echo statements. in actual use, difference between echo and print in PHP:
Copy codeThe Code is as follows:Echo "asd"; // stringEcho "ads $ c"; // string + variableEcho 'ads $ C'; // string asd $ c is not a variableEcho "sd". "";Echo "sd", "";Echo $;Echo $ a. $ B;Echo $ a, $ B;Echo $ a. $ B. $ c;Echo $ a, $ B, $ c;Echo
In PHP, there are two basic output methods: Echo and Print.
PHP Echo and Print statements
The difference between Echo and print:
echo - 能够输出一个以上的字符串print - 只能输出一个字符串,并始终返回 1
Tip: Echo is slightly faster than print because it does not return any
This article introduces the most basic command in PHP programming, that is, the specific use case of the echo command, for your reference.PHP commands echo to output text to a Web browser as a means.Throughout your PHP career, you will use the echo
Echo command for php basic tutorial
This article introduces the most basic command in php programming, that is, the specific use case of the echo command, for your reference.PHP command echo is a means of outputting text to a Web
The difference between Echo and print in PHP, Phpechoprint
In general, the dynamic output of HTML content in PHP is achieved through print and ECHO statements, and in practice, both print and ECHO functions are almost identical. It can be said that
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.