, , : , 9 2016 , l, , .
:
array ->0->date: 09/08/2016
->John Doe: 1
Since I assume that all names are known in the elections, we can simply store all the names of the candidates in another array, which we can use when we scroll through it.
The inclusion of a new vote for John Doe on another date will be registered, your array will look like this
array ->0->date: 09/08/2016
->John Doe: 1
->1->date: 11/08/2016
->John Doe: 1
If someone votes for another guest on an already known date, he should look like this
array ->0->date: 09/08/2016
->John Doe: 1
->Jane Doe: 1
Hope this helps. If you want help getting through this thingy array structure, don't be afraid to ask :)
source
share