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
JavaScript
JavaScript
Jun 6, 2025 · Frontend Development

Why slice() Beats substr() and substring() in Modern JavaScript

This article explains the three JavaScript string extraction methods—substr(), substring() and slice()—highlighting why slice() is now preferred, detailing deprecation reasons for substr(), comparing behavior, parameter handling, and consistency, and summarizing its advantages over the other methods.

JavaScriptSliceString Methods
0 likes · 4 min read
Why slice() Beats substr() and substring() in Modern JavaScript
php Courses
php Courses
May 9, 2024 · Backend Development

Using PHP's substr() Function for String Manipulation

This article explains how to use PHP's substr() function to extract portions of a string, covering its syntax, parameters, and practical examples including specifying start positions, lengths, and negative offsets for flexible substring extraction.

BackendPHPString
0 likes · 4 min read
Using PHP's substr() Function for String Manipulation
php Courses
php Courses
Apr 29, 2024 · Backend Development

Using PHP substr Function to Extract Substrings

This article explains how to use PHP's built‑in substr function to retrieve substrings by specifying start positions and lengths, covering basic syntax, parameter details, return values, and common examples such as extracting the last characters, specific ranges, and converting substrings to uppercase.

BackendPHPString Manipulation
0 likes · 4 min read
Using PHP substr Function to Extract Substrings
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
php Courses
php Courses
Jun 30, 2023 · Backend Development

10 Essential PHP String Manipulation Functions with Examples

This article introduces ten essential PHP string manipulation functions—including substr, str_replace, implode, strpos, and sprintf—explaining their purpose and providing clear code examples that demonstrate how to extract, replace, concatenate, search, split, trim, and format strings efficiently in PHP development.

PHPString Functionsimplode
0 likes · 5 min read
10 Essential PHP String Manipulation Functions with Examples
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
Aug 18, 2020 · Backend Development

PHP substr() Function: Usage, Parameters, and Examples

This article explains PHP's substr() function, detailing its signature, parameter meanings, behavior with positive and negative start and length values, edge cases, and provides multiple code examples demonstrating how to extract substrings under various conditions.

Backendphp-functionsstring-manipulation
0 likes · 5 min read
PHP substr() Function: Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
May 24, 2020 · Backend Development

Mastering PHP substr(): How to Extract Substrings Effectively

This article explains the PHP substr() function, detailing its signature, parameter behavior for positive and negative start and length values, return values, and provides multiple code examples demonstrating various edge cases and expected outputs.

BackendPHPString Manipulation
0 likes · 3 min read
Mastering PHP substr(): How to Extract Substrings Effectively