i have 1 array follows :
array ( [154541] => array ( **[3831211] => array ( [34443] => 34443 [34444] => 34444 [34438] => 34438 [34442] => 34442 [34450] => 34450 )** ) [154514] => array ( **[3830597] => array ( [34442] => 34442 [34450] => 34450 [34443] => 34443 [34444] => 34444 [34438] => 34438 )** ) [154477] => array ( **[3829564] => array ( [34442] => 34442 [34444] => 34444 [34438] => 34438 [34450] => 34450 [34443] => 34443 )** [3830046] => array ( [34442] => 34442 [34444] => 34444 [34443] => 34443 [34438] => 34438 [34450] => 34450 ) ) [154474] => array ( [3829402] => array ( [34442] => 34442 [34450] => 34450 [34443] => 34443 [34438] => 34438 [34444] => 34444 ) ) [154472] => array ( [3831553] => array ( [34443] => 34443 [34450] => 34450 [34438] => 34438 [34444] => 34444 [34442] => 34442 ) [3829803] => array ( [34443] => 34443 [34444] => 34444 [34450] => 34450 [34442] => 34442 [34438] => 34438 ) [3829802] => array ( [34443] => 34443 [34444] => 34444 [34438] => 34438 [34450] => 34450 [34442] => 34442 ) [3831552] => array ( [34444] => 34444 [34450] => 34450 [34443] => 34443 [34442] => 34442 [34438] => 34438 ) [3830078] => array ( [34444] => 34444 [34442] => 34442 [34443] => 34443 [34438] => 34438 [34450] => 34450 ) ) )
now want replace inner array(i have made inner array ** in above array) new generated array called $alerts.
i not getting how replace inner-array $alerts array.
this should trick.
$array[154541] = array("3831211" => $alerts);
or if inner array has more elements:
$array[154541][3831211] = $newdata;
Comments
Post a Comment