echo()函数输出一个或多个字符串。
注意 - echo()函数比print()函数更快。
echo(str)
str − 要发送到输出的字符串
echo()函数不返回任何内容。
立即学习“PHP免费学习笔记(深入)”;
以下是一个示例:−
在线演示
<?php echo "Welcome!"; ?>
Welcome!
Let us see another example −
Live Demo
<?php $str1 = "Welcome!"; $str2 = "This is our website!"; echo $str1 . " " . $str2; ?>
Welcome! This is our website!
Let us see another example −
Live Demo
<?php echo "This demo text is on multiple lines."; ?>
This demo text is on multiple lines.
以上就是PHP中的echo()函数的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号