I have a PHP script that sends this array to the client via ajax:
Array
(
[0] => $209.90
[1] => $20.99
[2] => $188.91
)
I am sending the array to the client this way:
return $servicePrices;
I have this jQuery statement:
success: function(data) {
//console.log('Success'+data);
$( '#tourSubtotal' ).val( data[0] );
$( '#tourDiscount' ).val( data[1] );
$( '#tourTotal' ).val( data[2] );
},
My results for each ID value are A, r and r. Instead, how can I get the 3 currency data values from the array in my ajax jQuery?