range(); foreach($query as $level) { $level['creditspolicy'] = unserialize($level['creditspolicy']); $level['postpolicy'] = unserialize($level['postpolicy']); $level['specialswitch'] = unserialize($level['specialswitch']); $data[$level['levelid']] = $level; } savecache('grouplevels', $data); } ?>