Right now I'm storing them by combining the two strings together with a "-" in the middle and then exploding when I need to access the contents.
My problem lies in that I don't know how to, when the user is adding a new ID/number, check if the ID already exists within the array and modify that entry so that the entry's number value = Old Number + New Number.
Any help?
Also, is there a better way to store the ID/number within an array than how I am currently doing this?
Thanks,
Greenconure
Array "print_r" Example:
Code: Select all
Array
(
[0] => 1-123
[1] => 1-100
)