I need to track a fixed number of items with a variable number of value pairs for each in PHP (7.x or 8.x). Meaning item 1 may have 1 value pair (e.g. "red",32) whereas another item may have 3 value pairs associated with it (e.g. ("blue",99), ("white",45), ("orange", 67).
I need to be able to list all value pairs for each item. Is an array better suited for this task or is using an object easier/faster/more sensible?
Thank you!