This is my template of an angular.js SPA:
First off... USE ng-model, it will make your life so much easier
<div data-id="{{id}}" ng-repeat="id in array.id">
<input type="text" name="value_{{$index}}" ng-model="id.value">
</div>
Second, within your controller, you are going to need to use $http.post to send the data to your php endpoint/script.
app.controller("SomeController", function($scope, $http){
$scope.sendFunction = function (array) {
var data = {
array: array // The array of data you are passing in
}
$http.post('yourPhpEndpoint.php', data).success(function(data){
//This means that you have succeeded
}).error(function(){
//This means that it failed
})
}
})
Third, I'm going to assume that you are using a normalized database and would like to enter these arrays into a table one by one... In Your PHP File.
$data = json_decode(file_get_contents('php://input'));
$submittedInfo = $data->array;
foreach($submittedInfo as $arrayItem){
// Do an insert into the database
}