English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Character String Functions Manual
The print() function is used to output strings.
int print ( string $arg )
Return the output string.
print is actually not a function (but a language structure), so the parameter list does not need to be enclosed in parentheses.
And the main difference with echo: print supports only one parameter and always returns 1.
It always returns1.
Serial Number | Parameters and Description |
---|---|
1 | arg Input Data |
Try the following example, print output text:
<?php //print output text: print "Hello world!"; ?>Test and see‹/›
Output Result
Hello world!