protected static function indexByChild($rows)
    {
        $child = [];

        foreach ($rows as $row) {
            $child[(int)$row['child_id']] = (int) $row['parent_id'];
        }

        return $child;
    }
protected static function indexByChild($rows)
    {
        $child = [];

        foreach ($rows as $row) {
            $child[(int)$row['child_id']] = (int) $row['parent_id'];
        }

        return $child;
    }
protected static function indexByChild ( $ rows ) { $ child = [ ] ; foreach ( $ rows as $ row ) { $ child [ ( int ) $ row [ 'child_id' ] ] = ( int ) $ row [ 'parent_id' ] ; } return $ child ; }
Index rows by child id
@param $rows
@return array
Index rows by child id