Gen. partnerAlgotech

Print

Output parameter

|
August 22, 2019

print - String output

Description

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

print "hello world";
print "print can output multiple lines of text.But watch out for the HTML tag
because 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.

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.