Tag

arrays

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 11, 2025 · Backend Development

Master PHP’s array_unique(): Remove Duplicates and Sort Arrays Efficiently

Learn how to use PHP’s array_unique() function to eliminate duplicate values from arrays, understand its parameters—including optional sort flags—and see practical code examples that demonstrate deduplication and sorting for both string and numeric arrays.

PHParray_uniquearrays
0 likes · 4 min read
Master PHP’s array_unique(): Remove Duplicates and Sort Arrays Efficiently
php中文网 Courses
php中文网 Courses
May 29, 2025 · Fundamentals

Understanding Go Composite Data Types: Arrays, Slices, Maps, and Structs

This article provides a comprehensive guide to Go's four main composite data types—arrays, slices, maps, and structs—explaining their definitions, initialization, operations, characteristics, and best‑practice recommendations for effective Go programming in software development.

Composite TypesGoSlices
0 likes · 10 min read
Understanding Go Composite Data Types: Arrays, Slices, Maps, and Structs
Java Captain
Java Captain
Apr 29, 2025 · Fundamentals

How to Directly Output Arrays, Traverse Strings, and Read Keyboard Input in Java

This article demonstrates how to print an int array using Arrays.toString, presents two methods for iterating over a string—via toCharArray and charAt—and explains proper usage of Scanner methods to read tokens, lines, and integers from the console, including handling of newline characters.

JavaProgramming BasicsScanner
0 likes · 3 min read
How to Directly Output Arrays, Traverse Strings, and Read Keyboard Input in Java
php中文网 Courses
php中文网 Courses
Apr 15, 2025 · Backend Development

How to Use PHP’s array_reverse Function to Reverse Array Elements

This article explains the PHP array_reverse function, detailing its syntax, parameters, and usage with examples that demonstrate reversing a simple array, preserving keys, and displaying both original and reversed arrays, providing developers with a clear guide for handling array order in PHP.

PHParray_reversearrays
0 likes · 5 min read
How to Use PHP’s array_reverse Function to Reverse Array Elements
php中文网 Courses
php中文网 Courses
Apr 1, 2025 · Backend Development

Using PHP array_keys() Function: Syntax, Parameters, and Practical Examples

This article explains PHP's array_keys() function, detailing its syntax, parameters, and demonstrating its use with three code examples covering indexed, associative, and multidimensional arrays, helping developers retrieve array keys efficiently in PHP scripts.

PHParray_keysarrays
0 likes · 4 min read
Using PHP array_keys() Function: Syntax, Parameters, and Practical Examples
php中文网 Courses
php中文网 Courses
Feb 25, 2025 · Backend Development

PHP Arrays: Creation, Access, Manipulation, Traversal, and Common Functions

This article provides a comprehensive guide to PHP arrays, covering how to create them with array() or short syntax, initialize numeric arrays with range(), convert variables using compact(), and demonstrates accessing, adding, modifying, deleting, traversing with loops, and using built‑in functions, while also introducing related data structures.

Backend DevelopmentData StructuresPHP
0 likes · 5 min read
PHP Arrays: Creation, Access, Manipulation, Traversal, and Common Functions
php中文网 Courses
php中文网 Courses
Feb 20, 2025 · Backend Development

Introduction to PHP Basics: Syntax, Variables, Operators, Control Structures, Functions, and More

This article provides a concise overview of PHP fundamentals, covering script tags, variable declarations and data types, operators, control structures, functions, array and string manipulation functions, as well as file inclusion techniques, offering beginners a solid foundation for web development.

FunctionsSyntaxarrays
0 likes · 4 min read
Introduction to PHP Basics: Syntax, Variables, Operators, Control Structures, Functions, and More
php中文网 Courses
php中文网 Courses
Feb 19, 2025 · Backend Development

Using PHP's file() Function to Read Files into an Array

This tutorial explains how PHP's file() function reads a text file into an array, demonstrates the default behavior of preserving line breaks, and shows how to use flags such as FILE_IGNORE_NEW_LINES and FILE_SKIP_EMPTY_LINES to control newline retention and skip empty lines.

PHParraysbackend
0 likes · 4 min read
Using PHP's file() Function to Read Files into an Array
php中文网 Courses
php中文网 Courses
Feb 14, 2025 · Backend Development

Using PHP’s file() Function to Read Files into an Array

This article explains how PHP’s file() function reads a text file into an array, demonstrates the default behavior of preserving line endings, and shows how to use flags such as FILE_IGNORE_NEW_LINES and FILE_SKIP_EMPTY_LINES for more flexible file handling.

arraysbackendfile function
0 likes · 3 min read
Using PHP’s file() Function to Read Files into an Array
php中文网 Courses
php中文网 Courses
Jan 26, 2025 · Backend Development

Using PHP’s array_flip() Function to Swap Keys and Values

This article explains PHP’s array_flip() function, showing its syntax, how it swaps array keys and values, handling duplicate values, and demonstrates practical uses with code examples that flip fruit and student arrays and retrieve values efficiently.

Code ExamplePHParray_flip
0 likes · 5 min read
Using PHP’s array_flip() Function to Swap Keys and Values
php中文网 Courses
php中文网 Courses
Jan 21, 2025 · Backend Development

Using PHP's array_values() Function to Reindex and Convert Arrays

This article explains PHP's array_values() function, showing how it returns a new array with re‑indexed keys, provides examples with both indexed and associative arrays, demonstrates that the returned array is a copy, and discusses practical scenarios for its use.

Code ExamplePHParray_values
0 likes · 4 min read
Using PHP's array_values() Function to Reindex and Convert Arrays
php中文网 Courses
php中文网 Courses
Dec 25, 2024 · Backend Development

Using PHP array_keys() Function: Syntax, Parameters, and Practical Examples

This article explains the PHP array_keys() function, detailing its syntax and optional parameters, and provides three clear code examples that demonstrate how to retrieve keys from indexed, associative, and multidimensional arrays.

array_keysarraysbackend
0 likes · 5 min read
Using PHP array_keys() Function: Syntax, Parameters, and Practical Examples
php中文网 Courses
php中文网 Courses
Dec 24, 2024 · Backend Development

Using PHP's array_unique() Function to Remove Duplicate Array Elements

This article explains PHP's array_unique() function, detailing its syntax, parameters, and return value, and provides clear examples showing how to remove duplicate elements from arrays and optionally sort them using the $sort_flag parameter.

Duplicate RemovalPHParray_unique
0 likes · 4 min read
Using PHP's array_unique() Function to Remove Duplicate Array Elements
php中文网 Courses
php中文网 Courses
Dec 18, 2024 · Backend Development

PHP array_merge() Function: Syntax, Examples, and Usage Guide

This article explains the PHP array_merge() function, its simple syntax, and demonstrates how to merge indexed, multiple, and associative arrays with clear code examples, showing the resulting output and highlighting key behaviors such as key overriding.

Code ExamplePHParray_merge
0 likes · 5 min read
PHP array_merge() Function: Syntax, Examples, and Usage Guide
php中文网 Courses
php中文网 Courses
Dec 3, 2024 · Backend Development

Using PHP's array_keys() Function: Syntax, Parameters, and Practical Examples

This article introduces PHP's array_keys() function, explains its syntax and optional parameters, and provides three practical code examples demonstrating its use with indexed, associative, and multidimensional arrays, helping developers retrieve array keys efficiently.

array_keysarraysbackend
0 likes · 5 min read
Using PHP's array_keys() Function: Syntax, Parameters, and Practical Examples
php中文网 Courses
php中文网 Courses
Nov 8, 2024 · Backend Development

Using PHP array_merge() to Combine Arrays

This article explains the PHP array_merge() function, its syntax, and provides clear examples of merging indexed and associative arrays, demonstrating how multiple arrays can be combined into a new array with key overwriting behavior for duplicates.

Backend DevelopmentCode ExamplePHP
0 likes · 4 min read
Using PHP array_merge() to Combine Arrays
php中文网 Courses
php中文网 Courses
Oct 21, 2024 · Backend Development

Using PHP array_push to Add Elements to an Array

This article explains how the PHP array_push function can append one or multiple elements to the end of an array, shows step‑by‑step code examples for single and multiple element insertion, and demonstrates the resulting array length and contents.

PHParray_pusharrays
0 likes · 3 min read
Using PHP array_push to Add Elements to an Array
IT Services Circle
IT Services Circle
Sep 17, 2024 · Frontend Development

Why [] == ![] in JavaScript: Understanding Loose Equality and Its Pitfalls

This article explains the surprising result of the JavaScript expression [] == ![], detailing how empty arrays are truthy, how they are coerced to strings and numbers during loose equality comparison, and why using strict equality (===) or TypeScript avoids such confusing behavior.

JavaScriptLoose EqualityStrict Equality
0 likes · 4 min read
Why [] == ![] in JavaScript: Understanding Loose Equality and Its Pitfalls
php中文网 Courses
php中文网 Courses
Aug 8, 2024 · Backend Development

Using PHP's array_flip() Function to Swap Keys and Values

This article explains PHP's array_flip() function, detailing its syntax, behavior with duplicate values, and practical uses such as reversing associative arrays and looking up keys by value, illustrated with clear code examples and output demonstrations.

array_fliparraysbackend
0 likes · 4 min read
Using PHP's array_flip() Function to Swap Keys and Values
php中文网 Courses
php中文网 Courses
Aug 6, 2024 · Backend Development

Understanding PHP's array_fill() Function: Usage, Parameters, Return Values, and Examples

This article explains PHP's array_fill() function, detailing its purpose, parameters, return behavior, and provides clear code examples—including simple and two‑dimensional array fills—to help developers quickly master array creation and population in backend development.

array_fillarraysbackend
0 likes · 5 min read
Understanding PHP's array_fill() Function: Usage, Parameters, Return Values, and Examples