从数组中获取值名称

how i can get "name" from array in foreach loop?

This is my array:

Array
(
    [0] => Array
        (
            [term_id] => 2
            [name] => test1
        )

    [1] => Array
        (
            [term_id] => 13
            [name] => test2
        )

    [2] => Array
        (
            [term_id] => 22
            [name] => test3
        )

    [3] => Array
        (
            [term_id] => 19
            [name] => test4
        )

)

i tried with foreach:

foreach ($tags as $get){
    $array[] = array('new' => $get[0]->name);
}

but not work, my question is: how to get value name from this array?

Try with -

foreach ($tags as $get){
    $array[] = array('new' => $get['name']);
}

You are very close:

foreach ($tags as $get){
    $array[] = array('new' => $get['name']);
}