Skip to main content
deleted 112 characters in body
Source Link
//This is the array name in which your data is stored.
$my_array = array($array_data);

// now lets get one level inside the array 
foreach($my_array as $key => $value ){

// ok now unset un-wanted index from the array into a temporary array
unset($value['to_id']);

// overwrite our temporary array to original array keeping the keys same as before.
$my_array[$key] = $value;
//Thats it your Problem Solved :)
}

// Bonus if you want to re-arrange your array index do this
// $my_array = array_values($my_array);

echo "<pre>";
print_r($my_array);
echo "</pre>";
//This is the array name in which your data is stored.
$my_array = array($array_data);

// now lets get one level inside the array 
foreach($my_array as $key => $value ){

// ok now unset un-wanted index from the array into a temporary array
unset($value['to_id']);

// overwrite our temporary array to original array keeping the keys same as before.
$my_array[$key] = $value;
//Thats it your Problem Solved :)
}

// Bonus if you want to re-arrange your array index do this
// $my_array = array_values($my_array);

echo "<pre>";
print_r($my_array);
echo "</pre>";
//This is the array name in which your data is stored.
$my_array = array($array_data);

// now lets get one level inside the array 
foreach($my_array as $key => $value ){

// ok now unset un-wanted index from the array into a temporary array
unset($value['to_id']);

// overwrite our temporary array to original array keeping the keys same as before.
$my_array[$key] = $value;
//Thats it your Problem Solved :)
}

echo "<pre>";
print_r($my_array);
echo "</pre>";
Source Link

//This is the array name in which your data is stored.
$my_array = array($array_data);

// now lets get one level inside the array 
foreach($my_array as $key => $value ){

// ok now unset un-wanted index from the array into a temporary array
unset($value['to_id']);

// overwrite our temporary array to original array keeping the keys same as before.
$my_array[$key] = $value;
//Thats it your Problem Solved :)
}

// Bonus if you want to re-arrange your array index do this
// $my_array = array_values($my_array);

echo "<pre>";
print_r($my_array);
echo "</pre>";