Category: PHP Tutorial

python tutorials and learn python

Created with Sketch.

PHP Spread Operator

PHP Spread Operator Summary: in this tutorial, you will learn about the PHP spread operator and how to use it effectively, like merging multiple arrays into a single one. Introduction to the PHP spread operator PHP 7.4 introduced the spread operator to the array expression. PHP uses the three dots (…) to denote the spread…
Read more

PHP array_merge

PHP array_merge Summary: in this tutorial, you will learn how to use the PHP array_merge() function to merge one or more arrays into one. Introduction to the PHP array_merge() function To merge one or more array into an array, you use the array_merge() function: array_merge ( array …$arrays ) : array Code language: PHP (php)…
Read more

PHP array_reverse

PHP array_reverse Summary: in this tutorial, you will learn how to use the PHP array_reverse() function to reverse the order of elements in an array. Introduction to the PHP array_reverse() function The array_reverse() function accepts an array and returns a new array with the order of elements in the input array reversed. The following shows…
Read more

PHP in_array

PHP in_array Summary: in this tutorial, you will learn how to use the PHP in_array() function to check if a value exists in an array. Introduction to the PHP in_array() function The in_array() function returns true if a value exists in an array. Here’s the syntax of the in_array() function: in_array ( mixed $needle ,…
Read more

PHP array_key_exists

PHP array_key_exists Summary: in this tutorial, you will learn how to use the PHP array_key_exists() function to determine if a key exists in an array. Introduction to the PHP array_key_exists() function The PHP array_key_exists() function checks if a key exists in an array. Here’s the syntax of the array_key_exists() function: array_key_exists ( string|int $key ,…
Read more

PHP array_keys

PHP array_keys Summary: in this tutorial, you will learn how to use the PHP array_keys() function to get the keys of an array. Introduction to the PHP array_keys function The PHP array_keys() function accepts an array and returns all the keys or a subset of the keys of the array. array_keys ( array $array ,…
Read more

PHP array_shift

PHP array_shift Summary: in this tutorial, you will learn how to use the PHP array_shift() function to remove an array from the beginning of an array. Introduction to the PHP array_shift function The array_shift() function removes the first element from an array and returns it. The following shows the syntax of the array_shift() function: array_shift(array…
Read more

PHP array_pop

PHP array_pop Summary: in this tutorial, you will learn how to use the PHP array_pop() function to remove an element from the end of an array. Introduction to the PHP array_pop() function The array_pop() function removes an element from the end of an array and returns that element. Here’s the syntax of the array_pop() function:…
Read more

PHP array_push

PHP array_push Summary: in this tutorial, you will learn how to add an element to the end of an array by using the PHP array_push() function. Introduction to the PHP array_push() function The array_push() function adds one or more elements to the end of an array. The syntax of the array_push() function is as follows:…
Read more

PHP array_unshift

PHP array_unshift Summary: in this tutorial, you will learn how to use the PHP array_unshift() function to prepend one or more elements to the beginning of an array. Introduction to the PHP array_unshift() function To prepend one or more elements to an array, you use the array_unshift() function: array_unshift ( array &$array , mixed …$values…
Read more