I'd work on one problem at a time. Trying to do more will be confusing.
When you call a method that belongs to a class, you must have a reference to an instance of that class.
What data...
Type: Posts; User: Norm
I'd work on one problem at a time. Trying to do more will be confusing.
When you call a method that belongs to a class, you must have a reference to an instance of that class.
What data...
First quote says "I have...". The second asks about creating a method. I'm confused.
You need to look at the classes and where the data is that is to be updated and have the method located where...
The array: collection must be defined as an array of Product objects. collection[i] is must be a Product object.