I got a strangely worded job quiz today. It says:
Write a PHP5 object whose instantiation creates an array (which is a property of that object) that contains a bunch of values.
The Display method of the property should output that array so that each element would appear on a different line on an HTML page.
This sounds like it's saying that "Display" is a method of the array... does that make any sense? Can arrays have methods? Or did they word it weird?
can arrays have functions/methods in them?
Moderator: General Moderators
Re: can arrays have functions/methods in them?
You are right, it is worded weird. I would assume they meant "the display method of the object"