Ten PHP Array functions that beginners should know

There are many array functions in PHP and most of the beginners don’t know those functions. And because of this absence of knowledge developers write the code to achieve required output. Instead if you knew key array functions then it makes your work easier, saves time and lines of code.

This is list of some of the main key PHP array functions.

1. explode() Split a string by string Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter.

2. list() Assign variables as if they were an array

3. extract() Import variables into the current symbol table from an array

4. end() advances array’s internal pointer to the last element, and returns its value.

5. array_values() returns all the values from the array and indexes the array numerically.

6. Implode() Join array elements with a string

7. array_murge() Merge one or more arrays

8. array_sum()  Calculate the sum of values in an array

9. array_search()  Searches the array for a given value and returns the corresponding key if successful

10. array_walk_recursive()  Apply a user function recursively to every member of an array. Applies the user-defined callbackfunction to each element of the array. This function will recurse into deeper arrays.

There are still many array functions. You can get all functions and their usage on http://php.net

How to learn new programming language?


What is programming language?

Any computer language is nothing but the set of predefined commands, statements and methods. Each language has variables, data types, conditional statements, loops and function etc.


Learning New language

It’s easy to learn new programming language, because you are already familiar with one programming language. It means you know how programming language works and it’s commands, statements and functions. You are aware of the structure of the language.

   So now it’s becomes very easy to learn new language. New language is also going to have similar structure, statements and methods. You can learn new language in one day, if you cover following points.


  1. Variable declaration
  2. Data types
  3. Conditional statements
  4. Loops
  5. Function declaration
  6. Array functions
  7. Strings functions
  8. File functions
  9. Date time functions
  10. Sessions and cookies
  11. Database connectivity & query execution
  12. Basic functions like printing the text, exit, log

If you cover these all points then you are done. You have learned new programming language. As time will pass you will explore more features frameworks and functionality of that language.