Skip to content
Advertisement

I want to emove quote on echo json_encode();

Result is:

{"plate":"LQT 883","model":"-1584460854"}

Actually I want this value as following:

{"plate":"LQT 883","model":-1584460854}

Here more Code, sorry

JavaScript

Advertisement

Answer

If you want json_encode() to encode the value as an integer, you need to cast it as one:

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