Php deals with array problems

is there a great god to help write a function that processes $arr into $arr1

    $arr = array(
        array("id"=>"1","name"=>"a"),
        array("id"=>"1","name"=>"b"),
        array("id"=>"1","name"=>"c"),
        array("id"=>"2","name"=>"d"),
        array("id"=>"2","name"=>"e"),
    );
    
    $arr1 = array(
        array("id" =>1, "name"=> array("a","b","c")),
        array("id" =>2, "name"=> array("d","e")),
    );
Mar.06,2021

$arr = array(
        array('id'=>'1','name'=>'a'),
        array('id'=>'1','name'=>'b'),
        array('id'=>'1','name'=>'c'),
        array('id'=>'2','name'=>'d'),
        array('id'=>'2','name'=>'e'),
    );
    
    
    $result = array();
    
    foreach ($arr as $value) {
        $result[$value['id']]['id'] = $value['id'];
        $result[$value['id']]['name'][] = $value['name'];
    }
    $result = array_values($result);
    print_r($result);
The

function wraps itself

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e91a50-1371.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e91a50-1371.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?