php print() function
Translation results:
英[prɪnt] 美[prɪnt]
n. (printed from a negative) photo; printed font; imprint; printed picture
vt. (on a soft surface ) to imprint; to print... : printing past tense: printed past participle: printed
php print() functionsyntax
Function:Output string
Syntax:int print (string $arg)
Parameters:
Parameters | Description |
arg | Output arg, print is not actually a function ( It's a language construct), so you don't need to surround the parameter list with parentheses. |
Note: print only supports one parameter and always returns 1.
php print() functionexample
<?php $data = "hello php.cn"; print $data; ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
hello php.cn
<?php $data = "Learning PHP in php.cn is a good choice"; print $data; ?>
Run Instance»
Click the "Run Instance" button to view the online instance
Output:
Learning PHP in php.cn is a good choice