2
In the code snippet config.json, need that whenever you run a PHP script, it will insert a new line below, with the number in sequence and corresponding id:
"assignment": {
                "0": "292",
                "1": "280",
                "2": "233",
                "3": "308"
            }
How do I make him 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. Then you would insert:
"assignment": {
                "0": "292",
                "1": "280",
                "2": "233",
                "3": "308"
                "4": "999"
            }
i am new with this, where do I call the config.json file? the $new_value would be for example: $new_value = '999'?
– Leandro Marzullo
@Leandromarzullo in Ricardo Rosa’s Reply he shows the
file_get_contents, to have the contents of the file.– William Aparecido Brandino