php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "substr"

What is the difference between substr() and mb_substr() in PHP, and when should each be used?

The main difference between substr() and mb_substr() in PHP is that substr() operates on bytes, while mb_substr() operates on characters. If your stri...

What potential pitfalls can arise from using substr() with false values in PHP?

Using substr() with false values in PHP can lead to unexpected results or errors because substr() expects the second argument to be an integer represe...

Are there any considerations to keep in mind when using functions like substr() in PHP for number manipulation?

When using functions like substr() in PHP for number manipulation, it's important to remember that substr() works with strings, not numbers. If you ne...

What are the potential pitfalls of using substr() in PHP code?

Using substr() in PHP code can lead to unexpected results if the start or length parameters are not carefully calculated. This can result in cutting o...

What potential pitfalls should PHP beginners be aware of when using preg_replace and substr functions together?

When using preg_replace and substr functions together, PHP beginners should be aware that the preg_replace function may return a string with different...

Showing 6 to 10 of 992 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 198 199 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.