1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| $tableau_init = array ('title' => array(
'label' => 'Date',
'type' => 'hidden_last',
'rules' => '',
'prep' => '',
'display' => 1,
'thumbs' => '',
'value' => 'date'),
'body' => array(
'label' => 'Title',
'type' => 'input',
'rules' => 'required',
'prep' => 'htmlentities',
'display' => 1,
'thumbs' => '',
'value' => ''));
$new_tableau = array();
foreach($tableau_init as $key=>$tab_values) {
$array_temp = array();
$array_temp['name'] = $key;
foreach($tab_values as $key_value => $value) {
$array_temp[$key_value] = $value;
}
array_push($new_tableau,$array_temp);
} |
Partager