PHP Programing language

print() Functions in PHP
Previous Home Next
adplus-dvertising

print()

The print() function outputs one or more strings.

Syntax:
print(strings)

Example:

<?php 
print "Gud Morning!"; 
?>

Output:

Gud Morning!

printf()

The printf() function outputs a formatted string.

Syntax:
printf(format,arg1,arg2,arg++)

Example:

<?php
$number = 9;
printf("%d is a number.",$number);
?>

Output:

9 is a number.

Previous Home Next