php - How to add in digits per json objects wih php
问题描述
How do I add digits per objects?
https://paste.ubuntu.com/p/mSzJnY87KF/
I want to do;
what I have to do, I have tried many ways.
tnks for responses
解决方案
只需要这样的东西
$arr = [];
$arr["1"] = "content 1";
$arr["10"] = "content 2";
echo json_encode($arr);
不使用array_push