PHP中的echo语句用于输出一个或多个字符串。以下是一些常见的echo用法:
echo "Hello World!";
echo "Hello", " World!";
$name = "John";
echo "My name is " . $name;
echo "<h1>Welcome</h1>";
$name = "John";
echo "My name is $name";
echo "This is a \"quote\"";
echo "Line 1\nLine 2";
echo "<h1>Welcome</h1>";
这些只是一些常见的用法,echo还有其他一些高级用法,如输出数组、对象等。