How to use print in PHP
In this article I will explain how the print() function can be used in PHP.
print() function in PHP
- The print() function is used to output one or more strings.
- The print() function is not a real function, it is a language construct.
- The print() function is no need to use parentheses with its argument list.
Syntax
Parameter
- string string is required parameter. It is sent to the output for One or more strings.
Example
The following example show to how the print() function can be used in PHP.
<html>
<body>
<h3 style="color: darkblue;">print() function example in PHP</h3>
<?php
print 'Welcome to'.'<br>';
print 'C-sharpcorner'.'<br>';
print 'have a nice day....'.'<br>';
print 1111.11;
?>
</body>
</html>
|
Output
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here