2 webmidas Oct 05, 2007 00:14

What makes you think they take up more memory space?
how much memory space an array takes depends on the way you use it.
But i have generally seen people using it inefficiently i.e. they just fetch whole dataset in array when they just need few data fields.
Also i have seen that many people when they use array they tend to forget to free up memory space which array took,
However if you are making a simple script or problem memory considerations are not so significant.
associative arrays will be fast but will take up more memory space.function and class is almost smae but cl;ass has an advantage that it can be resuable and easy to maintain and looks more professional