Tagged articles
11 articles
Page 1 of 1
php Courses
php Courses
Jan 5, 2026 · Backend Development

Master PHP String Truncation: 5 Methods for Clean, Multilingual Output

Learn how to efficiently truncate strings in PHP using five approaches—substr for ASCII, mb_substr for multibyte characters, regex with preg_match, explode with array handling, and a custom function that adds ellipsis—while understanding each method's syntax, advantages, and limitations.

String Manipulationcustom-functionexplode
0 likes · 5 min read
Master PHP String Truncation: 5 Methods for Clean, Multilingual Output
php Courses
php Courses
Sep 10, 2025 · Backend Development

Master Multibyte String Cutting in PHP with mb_substr – Tips & Examples

This article explains how PHP's mb_substr() function safely extracts portions of multibyte strings, details its syntax, parameters, and provides clear code examples demonstrating correct usage, edge cases, and its importance for multilingual web development.

BackendStringmb_substr
0 likes · 3 min read
Master Multibyte String Cutting in PHP with mb_substr – Tips & Examples
php Courses
php Courses
Sep 5, 2025 · Backend Development

Mastering PHP’s mb_substr: Handle Multibyte Strings with Ease

This article explains PHP's mb_substr() function, its signature, parameters, and provides clear examples showing how to correctly extract substrings from multibyte strings such as Chinese or Japanese without causing garbled output.

BackendString Manipulationmb_substr
0 likes · 3 min read
Mastering PHP’s mb_substr: Handle Multibyte Strings with Ease
php Courses
php Courses
Jun 20, 2025 · Backend Development

Master Multibyte String Cutting in PHP with mb_substr – Examples & Tips

The article explains PHP's mb_substr() function, detailing its syntax, parameters, and how it correctly handles multibyte characters, with multiple code examples and notes on edge cases, making it essential for developers working on internationalized backend projects.

BackendPHPString Manipulation
0 likes · 3 min read
Master Multibyte String Cutting in PHP with mb_substr – Examples & Tips
php Courses
php Courses
Jan 15, 2024 · Backend Development

Using PHP mb_substr() for Multibyte String Truncation

The article explains the PHP mb_substr() function, its syntax, parameter meanings, and provides multiple code examples demonstrating how to correctly truncate multibyte strings such as Chinese or Japanese without causing garbled output, along with important usage notes.

BackendPHPString
0 likes · 4 min read
Using PHP mb_substr() for Multibyte String Truncation
php Courses
php Courses
Jul 4, 2023 · Backend Development

Using substr() and mb_substr() to Extract Substrings in PHP

This article explains how PHP's substr() and mb_substr() functions work, detailing their syntax, parameter behavior for positive and negative start and length values, and provides multiple code examples demonstrating string extraction for both English and multibyte Chinese characters.

BackendPHPString Manipulation
0 likes · 6 min read
Using substr() and mb_substr() to Extract Substrings in PHP
Laravel Tech Community
Laravel Tech Community
May 9, 2023 · Backend Development

Common PHP String Manipulation Functions and Examples

This article explains several essential PHP string functions—including substr, mb_substr, stripos with substr, and direct character indexing—providing clear code examples and output demonstrations for handling both ASCII and multibyte characters.

BackendStringmb_substr
0 likes · 3 min read
Common PHP String Manipulation Functions and Examples
Laravel Tech Community
Laravel Tech Community
Sep 29, 2020 · Backend Development

PHP mb_substr Function: Multibyte‑Safe Substring Extraction

This article explains the PHP mb_substr() function, detailing its multibyte‑safe substring behavior, parameter list (str, start, length, encoding), return value, and provides a clear example showing how to extract the first two characters from a Chinese string.

BackendPHPString
0 likes · 2 min read
PHP mb_substr Function: Multibyte‑Safe Substring Extraction