Wrap all items of array in quotes – PHP

If we have associative PHP array and its necessary print it in JavaScript array, we ca use next PHP code: