In the snippet of code config.json
, I need every time I run a PHP script, it inserts a new line below, with the sequence number and corresponding id:
"assignment": {
"0": "292",
"1": "280",
"2": "233",
"3": "308"
}
How do I find these numbers (1,2,3, etc.) to insert the next one in sequence and put the $ id variable in the second column?
Ex: the next $ id = 999. Here you would enter:
"assignment": {
"0": "292",
"1": "280",
"2": "233",
"3": "308"
"4": "999"
}