PHP print Function

What is print Function?


The print function is used to output a string in PHP.



In the above syntax "string" specifies the strings to be outputted.

Example :

$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.


The "print" is actually not a function so no need to use the parenthesis.

PHP Topics

Ask Questions

Ask Question