I am exporting a array from PHP to JS to use a Pie Chart with AnyChart. But when i create a JS Array with PHP Data, JS Creates a Object instead of an array
This is a PHP Array
$ganhosArray[0] = array();
$ganhosArray[0]['x'] = 'Jhonatan';
$ganhosArray[0]['value'] = $valor01;
$ganhosArray[1] = array();
$ganhosArray[1]['x'] = 'Luiz';
$ganhosArray[1]['value'] = $valor02;
This is a JS Object,but i want to create an array.
var users = ". json_encode($ganhosArray).";