$partners = query($sql);
$partners = [
0=>['id'=>1, 'name'=>'Tset', 'site'=>'www.ya.ru'],
1=>['id'=>2, 'naem'=>'Maks', 'site'=>'google.ru']
]
$partners = [
0=>['id'=>1, 'name'=>'Tset'],
1=> ['id'=>1, 'site'=>'www.ya.ru'],
2=>['id'=>2,'naem'=>'Maks'],
3=> ['id'=>2, 'site'=>'google.ru']
]
select id, name from partners
union all
select id, site from partners
<?php
$tmp = [];
foreach ($partners as $item) {
$tmp[] = [ 'id' => $item['id'], 'name' => $item['name'], ];
$tmp[] = [ 'id' => $item['id'], 'site' => $item['site'], ];
}