I have an array of class objects:
class Foo
{
public $A;
public $B;
public $C;
}
I need a new array of C fields. Is there a way to convert the array without explicit loops? Hate that after C#.
// Explicit conversion:
foreach ($arr as $item)
{
$Cs[] = $item->C;
}
Regards,