Double associative array or indexed + associative array
- by clover
I'm undecided what's the best-practice approach for what I'm trying to do.
I'm trying to enter data into an array where the data will look like this:
apple
color: red
price: 2
orange
color: orange
price: 3
banana
color: yellow
price: 2
pineapple
color: yellow
price: 5
When I get input, let's say green apple (notice…