1
Vote

set property name in select

description

in c# linq
from o in arr select new {o.Title};
result:
a list of class that contain property : Title
but in php linq
from('$o')->in($arr)->select('new {$o->Title}');
result:
a array of class that contain property : 0
i must change code to:
from('$o')->in($arr)->select('new {"Title"=>$o->Title}');

comments