I've already asked a question like this but i'm getting issues. I'm using angular.js to send data to a php file. This php file is gathering a list of data and storing this in an array. I'm then encoding this array and sending it back to angular on a success function. I need to display each array one after the other on each other.
Any suggestions ?
if($result){
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){
$Participants = array(
firstname => $row['firstname'],
lastname => $row['lastname'],
amount => $row['longitude']
);
}
}
echo json_encode($Participants);
My angular
angular.forEach(response.data, function(value, key){
var Participants = {};
Participants = {
firstname: value['firstname'],
lastname: value['lastname'],
amount: value['amount'],
};
console.log(Participants);
});