echo和var_dump的區(qū)別
<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
$arr =json_decode($json,true);
echo($arr);
?>
請(qǐng)問為什么輸出的是Notice: Array to string conversion in /68/1413/DaOD/index.php on line 4
而吧echo換成var_dump就可以了?
<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
$arr =json_decode($json,true);
echo($arr);
?>
請(qǐng)問為什么輸出的是Notice: Array to string conversion in /68/1413/DaOD/index.php on line 4
而吧echo換成var_dump就可以了?
2016-08-02
舉報(bào)
2016-08-02
一個(gè)只有輸出作用,一個(gè)不僅輸出還可以查看數(shù)據(jù)類型?。?!