print - String output
Description
php
print 'Hello World!';
print(), is not really a real function (it's a language construct), so you don't need to use parentheses.
Parameters
- arg
Output parameter
Return values
Always returns the number 1.
Note
Note: Because this is a language construct (not a function), it cannot be loaded into a variable.
Example
php
print "hello world";print "print can output multiple lines of text.But watch out for the HTML tagbecause it will not print. That's what the <a href="/nl2br">Nl2br</a> function is for.";// Example of a connection to a variable$a = 'php';print 'I like ' . $a; // I like php
print is exactly the same function as echo. If you're looking for more information, check out this article on the echo function.