国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > PHP > 正文

PHP的print函數

2024-05-04 21:52:45
字體:
來源:轉載
供稿:網友

PHP的print函數,姑且說是函數吧啊。可以使用在PHP 4, PHP 5的環境中。

print函數的作用就是輸出一個字符串。使用方法:

int print ( string arg )

 


print() 是一個語言結構而非函數,因此它無法被變量函數調用。 請看下面的演示:)

<?php
print("Hello World");

print "print() also works without parentheses.";

print "This spans
multiple lines. The newlines will be
output as well";

print "This spans/nmultiple lines. The newlines will be/noutput as well.";

print "escaping characters is done /"Like this/".";

// You can use variables inside of a print statement
foo = "foobar";
bar = "barbaz";

print "foo is foo"; // foo is foobar

// You can also use arrays
bar = array("value" => "foo");

print "this is {bar['value']} !"; // this is foo !

// Using single quotes will print the variable name, not the value
print 'foo is foo'; // foo is foo

// If you are not using any other characters, you can just print variables
print foo; // foobar

print <<<END
This uses the "here document" syntax to output
multiple lines with variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon no extra whitespace!
END;
?>

注意: 由于這是一個語言結構而非函數,因此它無法被變量函數調用。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石景山区| 明光市| 惠水县| 衡水市| 汾阳市| 方城县| 夏河县| 康平县| 庆安县| 陆丰市| 天柱县| 顺义区| 祁连县| 蒙自县| 五华县| 南通市| 根河市| 景泰县| 洛阳市| 务川| 临颍县| 日喀则市| 芜湖县| 绵竹市| 武邑县| 东平县| 娱乐| 明水县| 青田县| 梁山县| 苏尼特左旗| 开阳县| 永善县| 始兴县| 桐梓县| 偃师市| 顺义区| 建瓯市| 东明县| 西乌珠穆沁旗| 曲沃县|