Monday, 29 September 2014

print in PHP

 PHP print() function is utilized to print a output string.

It can output all types of information and various outputs could be made with a single print() order.

Syntax:

print(strings)
strings : Required.One or more strings for output.

Tip : The print() function is somewhat slower than echo().

Example:

<?php
print 'Good Morning!'.'<br />';
$my_name = "Jack.";
print "My name is $my_name"."<br />";
?>
Output will be:
Good Morning!
My name is Jack.

0 comments:

Post a Comment