Re: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Maciek Sokolewicz
On 22-09-2012 16:19, Samuel Lopes Grigolato wrote: +1 to bad maintainability of the code. As a suggestion, one better solution could be something like: [...] class Entity { public $id; public $name; } [...] $entity = new Entity(); foreach [...] $entity->$$key = $value; [...] And

Re: RES: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
Samuel Lopes Grigolato wrote: >+1 to bad maintainability of the code. > >As a suggestion, one better solution could be something like: > >[...] > >class Entity { > public $id; > public $name; >} > >[...] > >$entity = new Entity(); >foreach [...] > $entity->$$key = $value; > >[...] > >And,