JSON_NUMERIC_CHECK and phone numbers

前端 未结 7 1148
执念已碎
执念已碎 2021-01-11 18:45

Our PHP API outputs results using json_encode with JSON_NUMERIC_CHECK enabled, which is important for financial figures, binary values etc.. but we have recently introduced

7条回答
  •  逝去的感伤
    2021-01-11 19:03

    For what it's worth, I had a similar problem in that I have international phone numbers starting with a + symbol. I used urlencode on my phone number string to over come the issue:

    $phone = urlencode( $phone );
    

提交回复
热议问题