filmov
tv
PHP Tutorial For Beginners | PHP Array Functions
![preview_player](https://i.ytimg.com/vi/w-_F6OdKgxg/maxresdefault.jpg)
Показать описание
Visit the official PHP website for full array function reference:
Chrome extension for pretty array formatting:
In this video, I am going to discuss most popular or widely used PHP array functions.
⏩ array
Initialize an array.
⏩ is_array
This function will check if a variable is an array or not. This will return a boolean true or 1 if its an array and boolean false or 0 if not.
⏩ in_array
This function will check if an element exists in an array. It needs two parameters, the first parameter is the value to search, and the second is the array. This will return a boolean true or 1 if element exists and false or 0 if not.
⏩ array_keys
This will return keys of the array.
⏩ array_key_exists
This function is similar with the in_array function, however, instead of the value, it will check for the keys. Same thing, first parameter is the key to search, and the second is the array. This will return a boolean true or 1 if array key exists and boolean false or 0 if not.
⏩ array_values
Get array values and remove keys (transform into indexed array).
⏩ array_unique
If you want to remove duplicate values in your array, this function is what you need. This will return unique the values of the array.
⏩ array_diff
Compare array1 against one or more other arrays and returns the values in array1 that are not present in any of the other arrays
⏩ array_map
The array_map functions will return an array containing the results after applying the callback functions. To use this function, we need two parameters. The first one is the callback function, the second parameter is the name of the array.
⏩ array_merge
This function will merge two or more arrays into a single array.
⏩ array_sum
This function will add all the numbers inside the array and return the sum.
⏩ count
Count elements inside the array.
⏩ array_column
This function will return arrays of values from a single column in the input array.
Do you want to learn more about web development?
🔔🔔 Please subscribe to this channel: 🔔🔔
Facebook Group:
Facebook Page:
If you need help or guide with your web development project, question, suggestion, or you want to share your takeaways with us for this video. Please comment down below. Really appreciated! 😉
Chrome extension for pretty array formatting:
In this video, I am going to discuss most popular or widely used PHP array functions.
⏩ array
Initialize an array.
⏩ is_array
This function will check if a variable is an array or not. This will return a boolean true or 1 if its an array and boolean false or 0 if not.
⏩ in_array
This function will check if an element exists in an array. It needs two parameters, the first parameter is the value to search, and the second is the array. This will return a boolean true or 1 if element exists and false or 0 if not.
⏩ array_keys
This will return keys of the array.
⏩ array_key_exists
This function is similar with the in_array function, however, instead of the value, it will check for the keys. Same thing, first parameter is the key to search, and the second is the array. This will return a boolean true or 1 if array key exists and boolean false or 0 if not.
⏩ array_values
Get array values and remove keys (transform into indexed array).
⏩ array_unique
If you want to remove duplicate values in your array, this function is what you need. This will return unique the values of the array.
⏩ array_diff
Compare array1 against one or more other arrays and returns the values in array1 that are not present in any of the other arrays
⏩ array_map
The array_map functions will return an array containing the results after applying the callback functions. To use this function, we need two parameters. The first one is the callback function, the second parameter is the name of the array.
⏩ array_merge
This function will merge two or more arrays into a single array.
⏩ array_sum
This function will add all the numbers inside the array and return the sum.
⏩ count
Count elements inside the array.
⏩ array_column
This function will return arrays of values from a single column in the input array.
Do you want to learn more about web development?
🔔🔔 Please subscribe to this channel: 🔔🔔
Facebook Group:
Facebook Page:
If you need help or guide with your web development project, question, suggestion, or you want to share your takeaways with us for this video. Please comment down below. Really appreciated! 😉