This is probably considered a really silly question, but I\'m in the process of putting together a simple template system for a website and am trying to keep track of my var
In ideal scenarios every variable should belong to an object, other than the variables local to methods for temp purposes. However we don't live in an ideal world and specially our programming languages are far from it. Based on what the situation is, choose the best way to go about it to make your life easier. If you are using things for templates, generally you keep all the data in an array and extract
the array to get stand alone variables.
So yeah, the object method is the nicest, try to make it happen as much as you can without spending crazy amounts of time in doing it.
Also if you love objects and want to have the neat ->
way of doing it, you can do
$object = (object)$array;
That would convert your array to an object.
Hope that helps.