Home >> PHP >> printf() function in PHP

printf() function in PHP

The printf() function used for outputs a formatted string.

Syntax

printf(string format,arg1,arg2,...)

Example

$pincode = 110085;
$name = "ram";
printf("Your pincode are %u and name %s.",$pincode,$name);

Output

Your pincode are 110085 and name ram

 

Post Your Comment

Next Questions
quotemeta() function
rtrim() function
sha1() function
sha1_file() function
similar_text() function
str_ireplace() function
str_pad() function
str_repeat() function
str_replace() function
str_shuffle() function
str_split() function
str_word_count() function
strcasecmp() function
strchr() function
strcmp() function
strcspn() function
strip_tags() function
stripslashes() function
stripos() function
stristr() function
strlen() function
strnatcasecmp() function
strnatcmp() function
strncasecmp() function
strncmp() function

Copyright ©2022 coderraj.com. All Rights Reserved.