php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "string formatting"

What are some common errors that may occur when passing a DateTime string from PHP to MySQL?

One common error when passing a DateTime string from PHP to MySQL is not formatting the DateTime string correctly. MySQL expects dates in the format '...

Are there alternative methods, besides wordwrap, to handle long string formatting in PHP to prevent layout issues?

When dealing with long strings in PHP that could potentially cause layout issues, one alternative method to wordwrap is using the `substr` function to...

In the context of PHP, what are the differences between using str_replace() and number_format() for formatting output?

When formatting output in PHP, `str_replace()` is used to replace all occurrences of a substring with another substring, while `number_format()` is sp...

How can PHP be used to remove line breaks from a string before appending it to a text file?

When appending a string to a text file in PHP, it is important to remove any line breaks that may be present in the string to ensure proper formatting...

How can one properly format a JSON string in PHP to avoid syntax errors?

When creating a JSON string in PHP, it is important to properly escape special characters to avoid syntax errors. One way to do this is by using the `...

Showing 76 to 80 of 10000 results

‹ 1 2 ... 13 14 15 16 17 18 19 ... 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.