Jump to content

Add elements to my array


azunoman

Recommended Posts

using form buttons and drop downs I collect information for a group of accessories.  From this information I can then from subsequentr processing display the group and accessory descriptions prices etc...all works great....

 

In this same code where I retrieve the group code record and the associated groups accessory information I would like to store the original price as the price could change after a customer order.

 

So what I would simply like to do is be able to add to say ['OXYG'][0] other information....I thought of just creating a new array as I build my display from this array but if I could just add...well maybe it's greener to recycle the current array. :)  also I was just planing on serializing the array and filing it into a 'blob?' for later recall....thanks in advance for review and comments....

 

An example of my array:  (data is by group with 1 or more accid's)

[OXYG] => Array
                (
                    [0] => 53
                )

            [PELV] => Array
                (
                    [0] => 55
                )

            [MISC] => Array
                (
                    [0] => 57
                    [1] => 62
                    [2] => 48
                    [3] => 33
                    [4] => 45
                    [5] => 2
                    [6] => 63
                    [7] => 1
                    [8] => 46

           

Link to comment
https://forums.phpfreaks.com/topic/128279-add-elements-to-my-array/
Share on other sites

I somehow want to end up with something like this:

 

[MISC] => Array
                (
                    [0] => 57 =>['ListPrice']['IncIND']['StdIND'] etc....for each accessory ID
                    [1] => 62
                    [2] => 48
                    [3] => 33
                    [4] => 45
                    [5] => 2
                    [6] => 63
                    [7] => 1
                    [8] => 46

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.