Nov 13, 2011

Videos: Arrays in PHP


We have divided this information into two videos, so they take less than 10 minutes can be uploaded to YouTube.There are videos for people with little experience in PHP, as deal with some of the most basic aspects of this and other programming languages.
We will see in the first of the videos how to create arrays of different ways. A function called array () in PHP used to create a table and where we can directly specify, if desired, the initial values ​​that have the array. We will also see other ways to populate an array with data specifying the index in brackets or even without specifying the index.
In the first video tutorial we will limit ourselves only to the normal arrays that have numeric indices. We will end the video with a practice which we will go all the boxes in the array with a for loop. We have not seen in detail the PHP control structures, but we will have to make a for loop is not very complicated.

In the second video we see what they are associative arrays, that is, those with index alphanumeric strings. We'll see how to create associative arrays, populating the data from the actual function array (), and through the assignment using the array itself once created and put a string as an index in the brackets.
We'll see how to access contained in the tables and finally do another loop to traverse an associative array. In the loop can not be used for the control structure, it is to iterate and numerical values ​​associative array indices are alphanumeric, and then use a foreach loop called to scroll through the array, recovering both the indices and the values ​​of each of its boxes.

We hope that these two videos of PHP have been of interest, but not all we should comment on the arrays, so that soon we will show some other video tutorials on this subject.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Premium Wordpress Themes