php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "string formatting"

What is the difference between using sprintf() and printf() in PHP for formatting output?

The main difference between using sprintf() and printf() in PHP for formatting output is that sprintf() returns the formatted string as a result, whil...

How can the strftime function in PHP be used as an alternative to the date function for formatting dates?

The `strftime` function in PHP can be used as an alternative to the `date` function for formatting dates by allowing for more customizable date format...

How does casting a formatted number back to a float affect the formatting in PHP?

When casting a formatted number back to a float in PHP, the formatting is lost and the number is converted back to its original float value. To mainta...

How can the str_replace() function be utilized to replace line break characters in a string before saving it to a .txt file in PHP?

When saving a string to a .txt file in PHP, line break characters (\n) may cause formatting issues. To replace these line breaks before saving the str...

How can whitespace and formatting affect the effectiveness of regex patterns in PHP?

Whitespace and formatting can affect the effectiveness of regex patterns in PHP because extra spaces or line breaks can inadvertently be included in t...

Showing 36 to 40 of 10000 results

‹ 1 2 ... 5 6 7 8 9 10 11 ... 1999 2000 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.