[Solar-talk] another blonde array problem

Jeff Surgeson solar at 3hex.com
Mon Dec 3 12:07:54 CST 2007


Hi All

Got this!
array(
    0 => array('Power Generation' => 'Using the Sun'),
    1 => array('Power Generation' => 'Using the Wind'),
    2 => array('Heating & Cooling' => 'Radiant Slabs'),
    3 => array('Heating & Cooling' => 'Domestic Hot Water'),
);

Need this!

array(
    'Power Generation' => array(
        'Using the Sun' => 'ACTION_SUN',
        'Using the Wind' => 'ACTION_WIND',
    ),
    'Heating & Cooling' => array(
        'Radiant Slabs' => 'ACTION_SLABS',
        'Domestic Hot Water' => 'ACTION_WATER',
    ),
);

Anyone care to put me out of my misery and do this with a few foreach 
loops? :-(

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the Solar-talk mailing list