PHP JSon How to read boolean value received in JSon format and write in string on PHP

前端 未结 3 1316
感情败类
感情败类 2020-12-21 04:46

I receive this JSON string from another site and I cannot modify what received from. The string is receive in $_POST and is :

[
    {
        \"clientId\":\         


        
3条回答
  •  感动是毒
    2020-12-21 04:56

    I know there is already an answer to this but it may be worth noting that var_dump outputs Boolean values better it just has worse formatting IMO.

        
    

    Results in

    Array
    (
        [0] => 1
        [1] => 
    )
    array(2) {
      [0]=>
      bool(true)
      [1]=>
      bool(false)
    }
    

提交回复
热议问题