Creating one array from another array in php

前端 未结 2 1396
故里飘歌
故里飘歌 2020-11-22 04:33

I have an array that looks like this. This is a 2 dimensional array.

$MainArray = Array
(
    [0] => Array
        (
            [Job_Name] => WXYZ
            


        
2条回答
  •  北海茫月
    2020-11-22 05:18

    foreach ($MainArray as $value) {
        $name = $value['Machine_Name'];
        unset($value['Machine_Name']);
        $ConvertedArray[$name][] = $value;
    }
    

提交回复
热议问题