|
|
Tutorials » Php »
|
Topic |
What is print Function?
|
|
Explanation |
|
The print function is used to output a string in PHP.
Syntax:
print(strings)
In the above syntax "string" specifies the strings to be outputted.
Example:
<?php
$str = "What services HIOX INDIA provide?";
print $str
print "$str. <br > "Web Hosting";
?>
Result:
What services HIOX INDIA provide?
Web Hosting
In the above example strings are stored in "$str" and the same is displayed using the print function along with another string.
NOTE:
The "print" is actually not a function so no need to use the parenthesis.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|