Cannot send array to php via AJAX?

Cannot send array to php via AJAX?

Well I followed&nbsp;<a href="https://stackoverflow.com/questions/9001526/send-array-with-ajax-to-php-script" target="_blank">this</a>&nbsp;question, but cannot send array to php it returns me always empty:

Well I followed this question, but cannot send array to php it returns me always empty:

JS:

            values = [];
            values['mpsRegnomer'] = $('#mpsRegnomer').val();
            values['mpsMarka'] = $('#mpsMarka').val();
            values['mpsMarkaOther'] = $('#mpsMarkaOther').val();
            values['engineType'] = $('#engineType').val();
            values['seatNumberInput'] = $('#seatNumberInput').val();
            values['carColor'] = $('#carColor').val();
            values['mpsChassiNum'] = $('#mpsChassiNum').val();
            values['mpsModel'] = $('#mpsModel').val();
            values['mpsModelOther'] = $('#mpsModelOther').val();
            values['mpsManufactureDate'] = $('#mpsManufactureDate').val();
            values['mpsfor'] = $('#mpsfor').val();
            values['VehicleType'] = $('#VehicleType').val();
            values['dvigatelInput'] = $('#dvigatelInput').val();
            values['engineMaxPower'] = $('#engineMaxPower').val();
            values['is_automatic'] = $('#is_automatic').val();
            console.log(values);

        $.ajax({
                type: 'POST',
                url: 'assets/clients/services/saveDataMPS.php',
                async: false,
                dataType: "JSON",
                data: {"values": JSON.stringify(values)},
                success:function(response){
                    alert(1);
                }
        });

console.log(values) show me that array is OK.

PHP code:

<?php

var_dump(json_decode($_POST["values"])); exit;

It returns me always empty, also tried only with var_dump($_POST); same result.. Where am I wrong?

Result from console.log(values):


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

jQuery ajax get request method example

### jQuery Ajax Get Request Method Example This article is originally published at [https://www.tutsmake.com/jquery-api-ajax-get-method-example/](https://www.tutsmake.com/jquery-api-ajax-get-method-example/...

Ajax (jQuery) PHP Script // move_uploaded_file-problem

I'm working on a&nbsp;<strong>gallery-upload</strong>-function with

How To Create Chat App in PHP Using Ajax and JQuery

In this tutorial, you'll learn how to create chat system in PHP using Ajax and JQuery