Tagged articles
138 articles
Page 2 of 2
Laravel Tech Community
Laravel Tech Community
Dec 23, 2020 · Backend Development

Using PHP's natsort() Function for Natural Order Array Sorting

This article explains PHP's natsort() function, which performs natural order sorting on arrays while preserving key/value associations, describes its parameters and return values, and provides a complete example comparing standard sorting with natural sorting to illustrate the differences in output.

ArrayPHPSorting
0 likes · 2 min read
Using PHP's natsort() Function for Natural Order Array Sorting
Laravel Tech Community
Laravel Tech Community
Nov 22, 2020 · Backend Development

Using PHP's array_search() to Locate a Value Within an Array

This article explains how PHP's array_search() function searches for a specified needle in a haystack array, describes its parameters—including the optional strict mode—and shows example code demonstrating how to retrieve the key of a matching element.

PHPSearcharray_search
0 likes · 2 min read
Using PHP's array_search() to Locate a Value Within an Array
Laravel Tech Community
Laravel Tech Community
Nov 14, 2020 · Backend Development

PHP array_pop() – Popping the Last Element from an Array

This article explains PHP's array_pop() function, describing its behavior, parameters, return value, and provides a complete example that demonstrates how the function removes the last element from an array and what output is produced.

PHParray-manipulationarray_pop
0 likes · 2 min read
PHP array_pop() – Popping the Last Element from an Array
Laravel Tech Community
Laravel Tech Community
Nov 10, 2020 · Backend Development

Using array_map() to Apply a Callback Function to Array Elements

array_map() in PHP applies a user‑defined callback to each element of one or more arrays, returning a new array of the transformed values; the article explains its syntax, parameter requirements, return behavior, and provides multiple code examples demonstrating numeric, string, and mixed‑array usage.

PHParray-manipulationarray_map
0 likes · 3 min read
Using array_map() to Apply a Callback Function to Array Elements
Laravel Tech Community
Laravel Tech Community
Nov 1, 2020 · Backend Development

PHP array_flip: Swapping Array Keys and Values

This article explains how the PHP function array_flip works, its parameter requirements, return values, edge cases such as duplicate values, and provides clear code examples demonstrating how to swap keys and values in an associative array.

PHPTutorialarray-manipulation
0 likes · 2 min read
PHP array_flip: Swapping Array Keys and Values
Laravel Tech Community
Laravel Tech Community
Sep 30, 2020 · Backend Development

PHP mb_substr_count: Counting Substring Occurrences

The article explains PHP's mb_substr_count function, detailing its syntax, parameters, return value, and provides a practical example showing how to count the number of times a substring appears within a multibyte string.

StringSubstringbackend
0 likes · 2 min read
PHP mb_substr_count: Counting Substring Occurrences
Laravel Tech Community
Laravel Tech Community
Sep 25, 2020 · Backend Development

PHP substr_count() Function – Usage, Parameters, and Examples

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
PHP substr_count() Function – Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Sep 11, 2020 · Backend Development

Understanding PHP preg_match() Function with Detailed Examples

This article explains the PHP preg_match() function, its parameters, return values, and optional flags, and provides four practical code examples demonstrating simple pattern matching, word‑boundary searches, URL host extraction, and named‑capture groups for extracting data.

backendpattern matchingphp-functions
0 likes · 4 min read
Understanding PHP preg_match() Function with Detailed Examples
Laravel Tech Community
Laravel Tech Community
Sep 8, 2020 · Backend Development

Using preg_split() to Split Strings with Regular Expressions in PHP

This article explains the PHP preg_split() function, its signature, parameters, return values, and provides multiple code examples demonstrating how to split strings using regular expressions, control split limits, and apply flags such as PREG_SPLIT_NO_EMPTY and PREG_SPLIT_OFFSET_CAPTURE.

backendphp-functionspreg_split
0 likes · 3 min read
Using preg_split() to Split Strings with Regular Expressions in PHP
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
Aug 11, 2020 · Backend Development

Understanding PHP strpos(): Finding the Position of a Substring

This article explains PHP's strpos function, detailing its syntax, parameters, return values, and provides three practical code examples demonstrating basic usage, strict comparison handling, and offset-based searches, including how to interpret false results and manage character positions accurately.

Tutorialbackendphp-functions
0 likes · 4 min read
Understanding PHP strpos(): Finding the Position of a Substring
Laravel Tech Community
Laravel Tech Community
Aug 9, 2020 · Backend Development

PHP stristr() Function: Syntax, Parameters, Return Value, and Examples

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
PHP stristr() Function: Syntax, Parameters, Return Value, and Examples
Laravel Tech Community
Laravel Tech Community
Aug 8, 2020 · Backend Development

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

This article explains the PHP strtr() function, detailing its two signatures for character and substring replacement, describing parameter behavior, return values, and special cases, and provides multiple code examples that illustrate how to apply the function in real-world scenarios.

Tutorialbackendphp-functions
0 likes · 2 min read
PHP strtr() Function: Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Aug 1, 2020 · Backend Development

PHP parse_url Function: Usage, Parameters, Return Values and Examples

This article explains the PHP parse_url() function, detailing its signature, optional component parameter, return types, and provides two complete code examples with expected output to illustrate how URLs are decomposed into scheme, host, port, user, password, path, query and fragment parts.

URL parsingbackendparse_url
0 likes · 4 min read
PHP parse_url Function: Usage, Parameters, Return Values and Examples
Laravel Tech Community
Laravel Tech Community
Jul 21, 2020 · Backend Development

PHP file_put_contents Function: Usage, Parameters, and Examples

This article explains PHP's file_put_contents function, detailing its purpose of writing strings, arrays, or streams to files, describing each parameter (filename, data, flags, context), return values, and providing two practical code examples demonstrating basic usage and appending with FILE_APPEND and LOCK_EX flags.

backendfile-handlingfile_put_contents
0 likes · 3 min read
PHP file_put_contents Function: Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Jul 5, 2020 · Backend Development

PHP urldecode Function: Usage, Parameters, and Example

This article explains the PHP urldecode() function, its syntax, parameter description, return value, and provides a complete example with code that demonstrates decoding URL-encoded query strings and the resulting output.

backendphp-functionsurl-decoding
0 likes · 2 min read
PHP urldecode Function: Usage, Parameters, and Example
Laravel Tech Community
Laravel Tech Community
Jun 22, 2020 · Backend Development

Understanding PHP preg_filter: Syntax, Parameters, and Examples

The article explains PHP's preg_filter function, detailing its signature, parameters, return values, and differences from preg_replace, and provides clear code examples that demonstrate how it returns only matched results while omitting non‑matching elements.

backendphp-functionspreg_filter
0 likes · 4 min read
Understanding PHP preg_filter: Syntax, Parameters, and Examples