Hi, i’ve a loop that add new rows in a repeater:
foreach ($arr['results'] as $results) {
$term = wp_insert_term(
$results['name'],
'store',
array(
'slug' => $results['name'],
'parent'=> $storeId
)
);
$row = array(
'room' => $term['term_id'],
'Id' => $results['id'],
'deletedate' => ''
);
$i = add_row('rooms_id', $row, 'option');
}
The problem is that it adds only the last row (overwriting???)
Any help?
Thanks in advance