Introduction
In this article I describe the PHP string functions print, printf and quoted_printable_decode. To learn some other math functions, go to:
- String Functions in PHP: Part1
- String Functions in PHP:Part2
- String Functions in PHP:Part3
- String Functions in PHP:Part4
- String Functions in PHP:Part5
- String Functions in PHP:Part6
- String Functions in PHP:Part7
- String Functions in PHP:Part8
- String Functions in PHP:Part9
- String Functions in PHP:Part10
- String Functions in PHP:Part11
PHP print() function
The PHP string print() function displays the output in the browser or outputs one or more strings.
Syntax
| print(strings) |
Parameter in print function
The parameter of the print function is:
| Parameter | Description |
| strings | It specifies the input data. |
Example
An example of the print function is:
<?php
print "Welcome";
$str=" at MCN Solution";
print $str;
?>
Output

PHP printf() function
The PHP string printf() function outputs a formatted string.
Syntax
| printf(format.arg1,arg2,..............) |
Parameter in printf function
The parameters of the printf function are:



Join the conversation! Your thoughts help the community grow.