Skip to content

Tag Archives: PHP-array

In this article, we will see how to compare the elements of arrays in PHP, & will know how to apply to get the result… Read More
The ‘=>’ symbol is used to assign key value pairs in an array. The value of left side is called key and the value of… Read More
The filter_list() function is an inbuilt function in PHP which is used to returns the list of all supported filters. Syntax: array filter_list( void )… Read More
Given an array of objects and the task is to sort the array by object by given fields. Approach: The usort() function is an inbuilt… Read More
The stream_get_transports() function is an inbuilt function in PHP which is used to get the list of registered socket transports. This function returns the indexed… Read More
The stream_get_filters() function is an inbuilt function in PHP which is used to get the list of registered stream filters. Syntax: array stream_get_filters( void )… Read More
The stream_get_meta_data() function is an inbuilt function in PHP which is used to get the header or meta data from the streams/file pointers.Syntax:   array stream_get_meta_data(… Read More
The stream_get_wrappers() function is an inbuilt function in PHP which is used to get the list of registered streams available on the running system. Syntax:… Read More
The stream_is_local() function is an inbuilt function in PHP which is used to check if a stream is a local stream or URL. Syntax: bool… Read More
Multi-dimensional arrays are such type of arrays which stores an another array at each index instead of single element. In other words, define multi-dimensional arrays… Read More
Associative arrays are used to store key value pairs. For example, to store the marks of different subject of a student in an array, a… Read More
Problem: How to merge two arrays while keeping keys instead of reindexing in PHP? Solution: This can be achieved in two ways which are by… Read More
In order to remove an element from an array, we can use unset() function which removes the element from an array and then use array_values()… Read More
Given two array arr1 and arr2 and the task is to append one array to another array. Examples: Input : arr1 = [ 1, 2… Read More
New item in an array can be inserted with the help of array_splice() function of PHP. This function removes a portion of an array and… Read More

Start Your Coding Journey Now!