Tagged articles
php-tutorial
17 articles · Page 1 of 1
This article explains PHP’s built‑in array_sum() function, covering its syntax, parameters, return values, handling of empty or non‑numeric arrays, and provides clear code examples to help developers sum array elements correctly.
PHParray sumarray_sum
0 likes · 4 min read

This article explains PHP's str_replace function, detailing its syntax, how it searches and replaces substrings, and provides multiple examples—including simple replacement, replacing multiple characters with arrays, and deleting characters—demonstrating practical usage for efficient string manipulation.
BackendString Manipulationphp-tutorial
0 likes · 3 min read

This article explains the PHP strlen() function, its syntax, and provides multiple code examples for obtaining string length, checking for empty strings, validating length limits, and handling multibyte characters, while noting the need for mb_strlen() for Unicode strings.
Backendphp-tutorialstring-length
0 likes · 3 min read

This article explains the PHP cURL extension’s curl_setopt() function, covering its syntax, parameter meanings, boolean return value, and provides a complete example that demonstrates sending a GET request, handling responses, and closing the cURL session.
api-requestcurlcurl_setopt
0 likes · 5 min read

This article explains how to use PHP's filemtime function to retrieve a file's last modification timestamp, demonstrates single‑file and multiple‑file examples, and shows how to format the timestamp with the date function for readable output.
date functionfile-modificationfilemtime
0 likes · 3 min read

This article explains the PHP str_replace() function, covering its syntax, parameter details, return value, and provides three practical code examples for single, multiple, and case‑insensitive replacements, helping developers master string manipulation in PHP.
Backendphp-tutorialstr_replace
0 likes · 5 min read

This article explains two efficient ways to swap keys and values of a PHP array—using the built‑in array_flip() function and a manual loop—compares their performance with a microtime benchmark, and provides complete code examples for each approach.
Backendarrayarray_flip
0 likes · 3 min read

This article explains PHP's versatile date() function, detailing its syntax, required format parameter, optional timestamp argument, and demonstrates numerous usage examples—including retrieving current date, time, individual components, and formatting specific timestamps—highlighting its importance for backend web development.
BackendDATETIMEPHP
0 likes · 4 min read

This article explains the PHP file_exists() function, covering its syntax, return values, practical examples for checking local and remote files as well as directories, and important limitations to consider when using it in backend development.
BackendPHPfile check
0 likes · 4 min read

This article explains PHP's array_column() function, available since version 5.5, showing its syntax, parameters, return values, and practical code examples for extracting specific keys from multidimensional arrays and optionally using an index key to create associative results.
BackendPHParray_column
0 likes · 5 min read

This article explains how to use PHP's str_split function to divide a string into an array of characters, covering basic syntax, specifying element length, handling multibyte characters, and providing practical code examples with output demonstrations.
BackendPHPphp-tutorial
0 likes · 5 min read

This article explains how to use PHP's file_put_contents() function to write strings or arrays to files, demonstrates flag options for appending and locking, and briefly mentions context resources for advanced file operations.
file writingfile_put_contentsphp-tutorial
0 likes · 4 min read

This article explains the PHP rtrim() function, its syntax, optional character mask, and provides multiple code examples demonstrating how to remove trailing whitespace and specific characters, along with important usage notes and a concise summary.
php-tutorialrtrimstring-manipulation
0 likes · 5 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 explains PHP's str_replace() function, demonstrating how to replace single characters, whole strings, array elements, and perform multiple replacements, including case‑sensitive considerations, with clear code examples. It also compares str_ireplace() for case‑insensitive operations and provides links to further learning resources.
php-tutorialstr_replacestring-replacement
0 likes · 5 min read

This article explains PHP's max() function, covering its syntax, how to compare integers, floats, strings, arrays, objects, and handling of empty values, with clear code examples for each case in different scenarios.
data comparisonmax-functionphp-tutorial
0 likes · 4 min read

This article explains PHP's array_splice function, covering its syntax, parameters, and how to insert, delete, replace single or multiple elements with code examples, and demonstrates a real‑world use case for paginating news lists in backend development.
Data Manipulationarrayarray_splice
0 likes · 5 min read
