View Single Post
Old 07-15-2008, 12:15 PM   #5 (permalink)
benton
The Contributor
 
Join Date: Apr 2008
Posts: 78
Thanks: 0
benton is on a distinguished road
Default

Quote:
Originally Posted by abiko View Post
From where do you get your array? Database or somewhere else?
Can you provide more info?
The array is generated dynamically from data read from a database but controlled by items not part of the database. So the array can end up like
PHP Code:
 Array
(
    [
1] => Array
        (
            [
212] => Banana Cream
            
[80] => Chocolate Peanut Butter
            
[52] => Milk Chocolate
            
[221] => Vanilla Bean
        
)

    [
3] => Array
        (
            [
45] => Alpine Punch
            
[194] => Apricot
        
)


So there may be ten items read in from the database but, in the above example, only items 1 and 3 will be added to the array. Then the key and value of each array element is loaded from the database data for that item.
benton is offline  
Reply With Quote