For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > May 2004 > Using objecs instead of arrays [WAS: Deep access of associative array









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Using objecs instead of arrays [WAS: Deep access of associative array
Tom

2004-05-04, 4:05 pm

Hi Jochem.

Jochem Maas wrote:
> regardless of the fact that you solved the problem I thought it might be
> interesting to point out that using an object might make things a little
> easier on the eyes/brain.


[*Small TomObj Class Snipped*]

Yes, this is a very good suggestion. Often when these kinds of arrays
get built, looking at using an object is a good idea. And I would most
likely agree that the snippet I used to represent my problem could be
better tackled with an object.

ASIDE: Will {$foo->selection[$foo->selected]} work with Smarty 2.5.0?

Either way, due to the 'bigger' picture of the whole project, I will be
sticking with arrays in this particular instance. Thanks though! :)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com