Logo name

Practical PHP Programming:Arrays

From IpbWiki

  • Currently1.00/5
Jump to: navigation, search

So far we've looked at the basic variables types such as strings and integers, as well as a variety of functions you can use to manipulate these data types. Beyond the basic data types are arrays and objects, which take a little bit more work in order for you to take advantage of them properly. More importantly, arrays take a solid understanding of functions before you try to use them, which is why they are separated here! As mentioned, objects are covered exclusively in their own chapter - this chapter is dedicated to the topic of arrays.

In order to model our surroundings in a programming environment accurately, it is important to recognise that some types of data naturally group together – colours, for example, naturally clump together into one group. Rather than having hundreds of separate variables – one for each colour – the reality is that it makes more sense to have one variable that holds a list, or array of colours.

Topics covered in this chapter are:

  • Reading arrays
  • Manipulating arrays
  • Multidimensional arrays (arrays of arrays)
  • Saving arrays


Chapter contents


Next: Practical_PHP_Programming:Basic array functions

This page was last modified on 16 October 2006, at 12:20.  This page has been accessed 1,165 times.  Content is available under GNU Free Documentation License 1.2Disclaimers