This is the array of objects.
let arr=[
{
'teacherName':'skg',
'subjectName':'c',
'totalClass':4
},
{
'teacherName':'skg',
'subjectName':'php',
'totalClass':4
},
{
'teacherName':'skg',
'subjectName':'js',
'totalClass':4
},
]
This is jQuery I used to send the data.
$('#myForm').submit(function () {
console.log(arr);
console.log('submit');
$.ajax({
type: 'POST',
url: 'http://localhost/Backend/check.php',
data: {
arr: arr
},
success: function (data) {
$('#output').html(data);
}
})
})
I did not tried anything because I do not know what to do.