Tagged articles
string-functions
14 articles · Page 1 of 1
This article explains the PHP basename() function, detailing its syntax, parameters, and behavior across operating systems, and demonstrates its usage through three practical examples that show how to retrieve file names from absolute and relative paths, with and without suffix removal.
Backendbasenamefile-path
0 likes · 4 min read

The article explains PHP's strrchr() string function, detailing its syntax, parameters, return values, case‑sensitivity behavior, and provides multiple code examples demonstrating how to locate the last occurrence of a character or substring within a string.
php-tutorialstring-functionsstring-search
0 likes · 5 min read

This article demonstrates seven different PHP techniques for extracting a file's extension, including using substr with strrchr, substr with strrpos, explode with array indexing, end(), pathinfo, and PATHINFO_EXTENSION, providing code examples and brief explanations for each method.
Tutorialfile extensionstring-functions
0 likes · 3 min read

The PHP substr_count() function counts the number of non‑overlapping occurrences of a substring within a string, optionally starting from a given offset and limiting the search length, and the article explains its signature, parameters, return value, and provides practical code examples.
Backendphp-functionsstring-functions
0 likes · 2 min read

This article explains PHP's str_word_count() function, detailing how it counts words in a string, the optional format and charlist parameters, the possible return types (integer or array), and provides multiple code examples demonstrating different usage scenarios.
Backendphp-functionsstr_word_count
0 likes · 3 min read

This article explains the PHP strstr() function, detailing its signature, parameters, return values, and providing clear code examples that demonstrate how to extract substrings before or after a specified needle within a string.
Backendphp-strstrprogramming
0 likes · 2 min read

The article explains PHP's strrchr() function, detailing its syntax, parameter behavior, return values, and provides two practical code examples demonstrating how to retrieve the last occurrence of a character or substring within a string.
Backendcode-snippetphp-example
0 likes · 3 min read

This article explains PHP’s strripos() function, which performs a case‑insensitive search for the last occurrence of a substring, details its parameters and return values, and provides a complete example with code and expected output.
BackendTutorialcase-insensitive
0 likes · 3 min read

This article explains PHP's strrpos() function, detailing its purpose, parameters, return values, and provides two practical code examples demonstrating how to locate the last occurrence of a substring with optional offsets in a string.
Backendprogrammingstring-functions
0 likes · 3 min read

This article explains the PHP stripos() function, which performs a case‑insensitive search for the first occurrence of a needle string within a haystack string, describes its parameters and return values, and provides a complete example with code illustrating typical usage and edge‑case handling.
BackendTutorialcase-insensitive
0 likes · 3 min read

This article explains the PHP stristr() function—the case‑insensitive version of strstr—including its syntax, parameter details, return behavior, and three illustrative code examples demonstrating typical usage scenarios. It also clarifies the effect of the optional before_needle flag and shows how to handle cases where the needle is not found.
Backendcase-insensitive-searchphp-functions
0 likes · 3 min read

This article explains the PHP strrchr() function, detailing its purpose of locating the last occurrence of a character in a string, describing its parameters and return value, and providing three practical code examples that demonstrate common usage scenarios.
BackendTutorialprogramming
0 likes · 3 min read

This article explains how PHP's stripos() function performs a case‑insensitive search to locate the first occurrence of a substring within a string, detailing its parameters, return values, and providing a complete example with expected output.
Backendcase-insensitivephp-tutorial
0 likes · 3 min read

This article explains PHP's lcfirst() function, which lowercases the first character of a string, details its parameter and return value, and provides code examples demonstrating its behavior with different input strings and locale considerations.
Tutoriallcfirststring-functions
0 likes · 2 min read
