Basic Concept Of Arrays In PHP

If you are a PHP web developer and if you want to build a PHP program properly, ie, in clean way, then, you may need to have a basic concept of the arrays, which can be used in PHP, since, it can reduce the work load of the PHP project to greater extent due to its flexibility and easiness. So, you might want to know about the basic concepts of arrays used is PHP, right? Well, here, we will provide you with the basic concept of arrays used in PHP. The basic example of PHP code with the concept of arrays in PHP code is provided below with their respective comments:


The above image is the result of the above PHP program code provided. Here, in the above output, we can see that the first output is 8, since arrays in PHP always starts with 0, not 1, and in the second case, we have passed the array position to be of 0, hence, the result on this is 4, since, 4 is in the first array, ie, list of array. Similarly, you can see the output of the above program too as in the provided image above and also you can learn more via the comments added in the above provided PHP program too.

If you have read the above code carefully and done it by yourself in your development environment, then, we can assume that you now have the basic concept of arrays in PHP, about how to use it and its basic syntax.

, , , , , , , , , , , , , , , , , , , , , , , , ,

Post navigation

Bishal Napit

Bishal Napit is a WordPress theme developer from Tansen, Palpa, with a passion to learn more on WordPress.

Leave a Reply