Michelangelo van Dam: PHP arrays – simple operations

Michelangelo van Dam continues his series on some of the basics of PHP with another look at arrays (started in this article).

Like all things in life, we need to start with simple things. So, in order to understand what arrays are in PHP, we need to take a look at the PHP manual to read what it is all about. […] The thing with PHP is that an array is probably one of the most used data structures in web applications build with PHP and used for a wide variety of purposes.

He covers the basics of:

  • storing multiple values in an array and pushing additional values onto the end
  • removing the last item added to the array
  • pulling the first element off of the array

In his next article, he plans on expanding this introduction to arrays by looking at associative arrays.


Schreibe einen Kommentar