لديك حساب بالفعل؟ دخول
دخول  سجل الأن 
Quick Table of Contents
  • print() — statement outputs data passed to it
  • echo() — statement for the same purposes as print()
  • printf() — output a blend of static text and dynamic information
  • sprintf() — identical to printf() except that the output is assigned to a string
[تحسين] The sprintf() Statement
The sprintf() statement is functionally identical to printf() except that the output is assigned to a string rather than rendered to the browser. The prototype follows:
string sprintf(string format [, mixed arguments])
An example follows:
$cost = sprintf("$%.2f", 43.2); // $cost = $43.20
12 / سبتمبر / 2011 الساعة 16:16