0
I have a system that emits an XML. It was done in PHP. XML has a tag which is a random number, but has to be incremental.
I mean, in the tag has the number 1000. The next tag has to have the number 1001.
This is easy to do in PHP. I left a fixed variable and every time it clicks, it increments. Only all XML is coming with equal number as it is incrementing from a fixed variable.
How to make each XML have its incremental number?
You want random numbers in order (1000, 1005, 1154, 1874, 2109...) or numbers in order only (1000, 1001, 1002, 1003...)?
– Not The Real Hemingway
I don’t know if I understand this correctly, but you have to redeem the last saved value in order to increase it. Then put it in the loop (for or foreach). Another option, since this number can be random, is to create the first number based on the team()
– Vítor André
I need numbers in order only 1000, 1001, 1002.
– brunoelyg
Yes, Andre! That way!
– brunoelyg
The entire xml is generated in a request or you want to work with XML as if it were a database?
– Guilherme Nascimento