Messages

Sliders

Sliders

Add a Signup Form to Your Website

Add a Signup Form to Your Website

مراحل ثبت دامنه و تنظیمات DNS

مراحل ثبت دامنه و تنظیمات DNS

چرا ترافیک وب سایت برای تجارت من مهم است؟

چرا ترافیک وب سایت برای تجارت من مهم است؟

Why is Website Traffic Important to My Business?

Why is Website Traffic Important to My Business?

ترافیک وب

ترافیک وب

Web traffic

Web traffic

8 نشانه اساسی گوگل برای رتبه بندی در سال 2019

8 نشانه اساسی گوگل برای رتبه بندی در سال 2019

مشکلات رایج در کدنویسی معتبر و رفع آنها

مشکلات رایج در کدنویسی معتبر و رفع آنها

article حل مشکل محتوای تکراری (Duplicate Content) در سایت

article حل مشکل محتوای تکراری (Duplicate Content) در سایت

رتبه بندی الکسا (Alexa) چیست و چقدر اهمیت دارد؟!

رتبه بندی الکسا (Alexa) چیست و چقدر اهمیت دارد؟!

چرا برخی سایت ها و وبلاگ ها رتبه الکسای بهتری دارند؟

چرا برخی سایت ها و وبلاگ ها رتبه الکسای بهتری دارند؟

article پیج رنک چیست و چگونه می توان آن را افزایش داد؟

article پیج رنک چیست و چگونه می توان آن را افزایش داد؟

article چگونه سایت یا وبلاگ را برای موتورهای جستجو بهینه سازی کنیم؟

article چگونه سایت یا وبلاگ را برای موتورهای جستجو بهینه سازی کنیم؟

کدام نوع وبلاگ می تواند برای تجارت  شما مفید باشد

کدام نوع وبلاگ می تواند برای تجارت شما مفید باشد

What a Blog Can Do For Your Small Business

What a Blog Can Do For Your Small Business

WhatsApp vs WhatsApp Business App: What's the Difference?

WhatsApp vs WhatsApp Business App: What's the Difference?

TinyMCE 5: Inline editor example

TinyMCE 5: Inline editor example

TinyMCE 5 - Inline editor example

TinyMCE 5 - Inline editor example

Native HTML5 Drag and Drop

Native HTML5 Drag and Drop

HTML5 Drag and Drop

HTML5 Drag and Drop

Step Organization in Java

Step Organization in Java

How to use Cucumber? – Cucumber best practices

How to use Cucumber? – Cucumber best practices

A Guide to Cucumber Best Practices

A Guide to Cucumber Best Practices

Why Responsive Design Support is the Most Important Feature You Can Add To Your Website

Why Responsive Design Support is the Most Important Feature You Can Add To Your Website

5 مزایای قدرتمند وبلاگ نویسی برای تجارت شما

5 مزایای قدرتمند وبلاگ نویسی برای تجارت شما

5 POWERFUL BENEFITS OF BLOGGING FOR YOUR SMALL BUSINESS

5 POWERFUL BENEFITS OF BLOGGING FOR YOUR SMALL BUSINESS

Angular 1 using redux architecture

Angular 1 using redux architecture

Home Login Logout

PHP: printf() function

The printf() function displays a formatted string from one or more arguments.

The printf() function displays a formatted string from one or more arguments. This function is ready from PHP4 and above. The function syntax is:

printf(format ,arg1, arg2, arg3....)
NameDescriptionRequired /
Optional
Type
formatEach conversion specification starts with a single percent sign (%) and ends with the following conversion characters.
% - returns a percent sign.
b - the argument is treated as an integer and display it as a binary number. 
c - the argument is treated as an integer and display it as a an ASCII value. 
d - the argument is treated as an integer and display as a signed decimal number. 
e - the argument is treated as scientific notation (e.g. 1.2e+2).
E - the argument treated as scientific notation (e.g.1.2E+2).
u - the argument is treated as an integer, and display as an unsigned decimal number. 
f- the argument is treated as a float, and display as a floating-point number. (local aware)
F - the argument is treated as a float, and display as a floating-point number (non-locale aware).
g - shorter of %e and %f. 
G - shorter of %E and %f. 
o- the argument is treated as an integer, and display as an octal number.
s - the argument is treated as string and display as a string.
x - the argument is treated as an integer and display as a hexadecimal number (with lowercase letters). 
X - the argument is treated as an integer and display as a hexadecimal number (with uppercase letters). 

Optional specification : 
Sign specifier : display a sign (+ or -) in front a number. By default, a - sign is used in front of a number if it is negative. 

Padding character : 
Default character is space. An alternate padding character can be specified by prefixing it with a single quote.
Alignment specifier. : - character makes the alignment left-justified. The default is right justified. 
Width specifier : An integer number specifies the width of the field. 
Precision specifier : The argument specifies how many decimal number should be displayed for floating numbers. When using this specifier on a string, it acts as a cutoff point, setting a maximum character limit to the string.
RequiredString
arg1The argument to be added as the first %-sign in the formatted string.RequiredMixed
arg2, arg3....These arguments will be added as second %, third % etc. in the formatted string.OptionalMixed

*Mixed : Mixed indicates that a parameter may accept multiple (but not necessarily all) types.


This funciton returns the length of the outputted string as result. Here is an example of the function:

<?php
$string1 = "Hello";
$var1 = 12;
printf('%s, we are learning the %uth chapter of PHP.',$string1, $var1);

مصطفی برمشوری

Lates posts
Most visited posts

Built with love to give everyone an opportunity to say something to the world
Copyright © 2018 All rights reserved - SITE123 

Terms - Privacy - Abuse

LocalTheme

Help

سوالی دارید؟ با ما مطرح کنید !پشتیبانی آنلاین است.در حال حاضر پشتیبانی غیرفعال است.با تیم ویرا وب صحبت کنیدبا تیم ویرا وب صحبت کنید