'', 'text' => '', 'forecolor' => '', 'background' => '', 'dimensions' => '', 'padding' => '', 'margin' => '', 'border' => '', 'behaviour' => '', 'position' => '', 'CSS3' => '' ); // add style keys to each section $data = array(); foreach ($sections as $sectionkey => $section) { $data[$sectionkey]['label'] = $section; $data[$sectionkey]['styles'] = $styles; $data[$sectionkey]['PIE'] = '0'; } // convert to json $json = json_encode($data); // maybe write to file // $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'bioship-scaffold.json'; // $fh = fopen($filename,'w'); fwrite($fh,$data); fclose($fh); // all done here. ?>