欧美日韩精品在线,国内精品久久久久久久久,一级毛片恃级毛片直播,清纯唯美亚洲综合欧美色

PHP的print函數(shù)_PHP教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:PHP生成隨機(jī)字符串
PHP生成隨機(jī)字符串的函數(shù),下面是我在網(wǎng)上找到的2個(gè)關(guān)于PHP隨機(jī)字符串的函數(shù),希望大家喜歡。 ?php function genRandomString(len) { chars = array( a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,

PHP的print函數(shù),姑且說(shuō)是函數(shù)吧啊。可以使用在PHP 4, PHP 5的環(huán)境中。

print函數(shù)的作用就是輸出一個(gè)字符串。使用方法:

int print ( string arg )

 


print() 是一個(gè)語(yǔ)言結(jié)構(gòu)而非函數(shù),因此它無(wú)法被變量函數(shù)調(diào)用。 請(qǐng)看下面的演示:)

<?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;
?>

注意: 由于這是一個(gè)語(yǔ)言結(jié)構(gòu)而非函數(shù),因此它無(wú)法被變量函數(shù)調(diào)用。

分享:PHP實(shí)例:一無(wú)限分類(lèi)的處理類(lèi)
PHP代碼:-------------------------------------------------------------------------------- ?php /* 名稱: 對(duì)分類(lèi)操作的業(yè)務(wù)邏輯封裝 * 說(shuō)明: 本類(lèi)中引用的其它類(lèi)(DB、Table、Item)均未提供,所以本類(lèi)只能做個(gè)參考,不能直接應(yīng)用 * 不是本人小氣不提供其

來(lái)源:模板無(wú)憂//所屬分類(lèi):PHP教程/更新時(shí)間:2010-04-12
相關(guān)PHP教程