note 121987 deleted from function.json-decode by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 15:00:47 +0000 |
| Subject: | note 121987 deleted from function.json-decode by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215426@lists.php.net to get a copy of this message | ||
Note Submitter: web at houhejie dot cn
----
string2array($str)
$arr=json_decode('["fileno",["uid","uname"],"topingid",["touid",[1,2,[3,4]],"touname"]]');
print_r($arr);
echo json_last_error();
output:
Array ( [0] => fileno [1] => Array ( [0] => uid [1] => uname ) [2] => topingid [3]
=> Array ( [0] => touid [1] => Array ( [0] => 1 [1] => 2 [2] => Array ( [0] =>
3 [1] => 4 ) ) [2] => touname ) ) 0
when I hope a function string2array($str), "spam2" suggest this. and It works well~~~hope
this helps us, and add to the Array function list