I am using a two dimensional array for inputting value from custom field. like this
<input type="text" name="education[0][edu_title]" placeholder="Title">
<input type="date" name="education[0][edu_to]" placeholder="To" class="calendar">
It is a loop that is value of 0 is changed to 1 and so on. Now if the form is submitted i want to get each value.
$tableedu = $wpdb->prefix . 'apply_edu';
$education=$pst_data['education'];
$sqldataedu = array();
$count=0;
foreach($education as $edu){
$sqldataedu['edu_title'] = stripslashes($edu[$count]['edu_title']);
$sqldataedu['edu_from'] = stripslashes($edu[$count]['edu_from']);
$sqldataedu['edu_to'] = stripslashes($edu[$count]['edu_to']);
$sqldataedu['edu_institute'] = stripslashes($edu[$count]['edu_institute']);
$sqldataedu['apply_id'] = $lastid;
$wpdb->insert($tableedu, $sqldataedu);
$count++;
}
how can i store each value in database