Arrays

I l @ ve RuBoard

I will cover arrays more thoroughly in Chapter 6, Using Arrays, as they are more complicated than either numbers or strings, but I'll introduce them briefly here. Whereas a string or a number will at most contain one value, an array can have a number of values assigned to it. You can think of an array as a list of values. In other words, you can put multiple strings and/or numbers into one array. You can even put multiple arrays into an array!

Tip

A standard array in PHP composed of strings and numbers (also known as an "indexed" or "vector" array) is what Perl also calls an array. By creating an array that consists of arrays, you can create the PHP equivalent of a Perl "hash," also called an "associative" or "multi-dimensional" array. In PHP, we refer to both types of arrays ”single- or multi-dimensional ” as simply "arrays."


I l @ ve RuBoard


PHP for the World Wide Web (Visual QuickStart Guide)
PHP for the World Wide Web (Visual QuickStart Guide)
ISBN: 0201727870
EAN: 2147483647
Year: 2001
Pages: 116
Authors: Larry Ullman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net