PHP Magic Book – Free PHP Scripts, Tutorials and Downloads, PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips

Get Data As An Array – Download PHP Example

Array & Loop Example

Suppose we have a form and we want from user to select from a list of check boxes and check his favorite choices, post that data as an array and we want to display that data by calling array and arranging it in a loop. Then for this purpose consider following example.

(more…)

Tags: , , ,
Posted in: Arrays, For Loop, Scripts
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

PHP Arrays

An array is a data structure that stores one or more values in a single value. In more detail ‘An array’ in PHP is actually an ordered map. A map is a type that maps values to keys. This type is optimized in several ways, so you can use it as a real array, or a list (vector), hashtable (which is an implementation of a map), dictionary, collection, stack, queue and probably more. Because you can have another PHP array as a value, you can also quite easily simulate trees.

An array can be created by the array() language-construct. It takes a certain number of comma-separated key => value pairs.

(more…)

Tags: ,
Posted in: Arrays, PHP Basics
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

    


  Subscribe Via RSS
  Subscribe Via Email