2014-04-08 35 views
0

用多維數組中的數字鍵替換命名鍵的最高效和簡潔的方法是什麼?用數字鍵替換命名鍵

我的陣列:

Array 
(
    [0] => Array 
     (
      [Property] => Brock 
      [Meint. Type] => grounds 
      [Maint. Task] => plow snow 
      [Status] => cancelled 
      [Started] => 
      [Completed] => 
      [Comments] => 
     ) 

    [1] => Array 
     (
      [Property] => Brock 
      [Meint. Type] => grounds 
      [Maint. Task] => plow snow 
      [Status] => pending 
      [Started] => 2010-01-16 
      [Completed] => 
      [Comments] => 
     ) 

    [2] => Array 
     ( 
      [Property] => Brock 
      [Mains. Type] => grounds 
      [Maint. Task] => plow snow 
      [Status] => complete 
      [Started] => 2010-01-16 
      [Completed] => 2010-01-16 
      [Comments] => 
     ) 

    [3] => Array 
     (
      [Property] => Brock 
      [Mains. Type] => grounds 
      [Maint. Task] => plow snow 
      [Status] => in progress 
      [Started] => 2014-01-16 
      [Completed] => 2014-01-16 
      [Comments] => 
     ) 

    [4] => Array 

目標是與[0],[MAINT更換[屬性]。鍵入]與[1](這應該有方括號,它們被自動刪除),[維護。任務]和[2],[狀態]和[3]等等。

回答