Skip to content
Advertisement

Remove double quote in json_encode()

I want remove double quote in my json_encode, that is my code:

JavaScript

My result is that:

JavaScript

I want to remove double quote of “id_posiciones” and “device_version” too.

How can I do for the result is that:

JavaScript

Advertisement

Answer

If you add an underscore to your regex at the end it will do it.

JavaScript

I assume that’s what that preg_replace is for anyway.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement