18 Lis 2008

Wybór następnego elementu z tablicy

$script_modes  = array('save_xml' => array('operation_type' => 'XML_TO_BASE', 'operation_mode' => 'LOAD_HTTP'),
'save_to_base' => array('operation_type' => 'XML_TO_BASE'),
'save_to_base2' => array('operation_type' => 'XML_TO_BASE')
);

if(!$script_mode) {
$script_mode = key($script_modes);
 $script_mode = 'save_to_base';
}

foreach($script_modes as $mode => $param) {
 if($script_mode==$mode)
  break;
}
$script_mode = key($script_modes);
echo $script_mode . '<br>';