Sunday, September 7, 2008

The print Function

The print function is used to print one or more variable in the output.
Syntax: print variablename;

Example inputs:
1.
print “smith”;
2.
$name = “Jones”;
print $name;
3.
$name=”Natasha”;
print “My name is $name”;
print “

print “What is yours?”;

Example outputs:

1.
Smith
2.
Jones
3.
My name is Natasha
What is yours?

No comments: