Json conversion of php, which automatically converts strings into numbers.

{"returnCode":"0","resultCode":"0","amount":1.00}
 $param= "{"returnCode":"0","resultCode":"0","amount":1.00}";
 $param=json_decode($param,true);

default amount is forcibly converted. Can you output it as is


Array
(
    [returnCode] => 0
    [resultCode] => 0
    [amount] => 1
)

wants


Array
(
    [returnCode] => 0
    [resultCode] => 0
    [amount] => 1.00
)

this effect meets the requirements
amount is automatically converted to number format 1? php bug?

Mar.23,2021

this is a number.

  

there is no bug, requirement problem, your requirement is to force floating-point display, then your problem should be how to force floating-point data output. Thank you, the specific code, due to personal bug reasons, input can not come up, find their own.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3744d-2c073.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3744d-2c073.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?