function array_lists($data, $column, $groupby)
{
$result = array();
foreach ($data as $row)
{
if (is_object($row))
{
$result[ $row->{$groupby} ][] = $row->{$column};
}
else
{
$result[ $row[$groupby] ][] = $row[$column];
}
}
return $result;
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community