I'm using the following code to no avail.
$conn = mysqli_connect('localhost','user','pass','banco');
try {
$body = file_get_contents("php://input");
$dados = json_decode($body);
foreach($dados as $dataone){
$nome = $dataone['nome'];
$img = $dataone['img'];
$qtd = $dataone['qtd'];
$sql = "INSERT into tabela (nome,img,qtd) values ('{$nome}','{$img}','{$qtd}')";
$qr=mysqli_query($conn,$sql);
}