Online
 
Friday, 21 November 2008
 
 

Implementing Arrays | Print |  E-Mail
 

In total, more than 60 functions currently are dedicated to array manipulation within PHP. Although there are far too many functions to cover in this book, almost all are documented extensively within the PHP documentation available at . Rather than simply reiterate the existing documentation, the focus of the remainder of this chapter will be on only the more advanced array functions and the application of those functions in scripts.

Now that you understand the formalities of the basic array, let's take a look at how arrays can be applied using the incredible number of array support functions available natively from within PHP.

Using an Array as a List

Perhaps one of the most common uses for an array is its use as a simple list. In fact, most of the examples discussed thus far have involved using the array as a simple list. In this section, we'll be looking at how a list using an array can be used to accomplish a specific taskthe automatic generation of the necessary HTML to display a group of images.

For this example, you'll define an array, $images, that will contain a list of all the different images that you will be displaying. You'll then use that array to create the necessary <IMG> HTML tags to display those images to the screen. shows the code.


This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment. Tags: Simple PHP, Pear, Easy PHP, PHP Tutorial, PHP MySQL, XSLT, Sap Tutorial, CSS Tutorial, XSL FO Java, SQL Tutorial.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 4000
 Notify me of follow-up comments
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

Jumbo Coklat
 
Top! Top!