Использование array_splice
:
<?php
$data = array();
$data[] = ['name' => 'last_visit', 'value' => '1211809129', 'expire' => '1558705129', 'domain' => '', 'path' => '/', 'prefix' => 'exp_', 'httponly' => 1, 'secure_cookie' => 0];
$data[] = ['name' => 'last_activity', 'value' => '1527169129', 'expire' => '1558705129', 'domain' => '', 'path' => '/', 'prefix' => 'exp_', 'httponly' => 1, 'secure_cookie' => 0 ];
$data[] = ['name' => 'csrf_token', 'value' => 'e39fe1edcd0bc48a6e35985069a', 'expire' => '1527176329', 'domain' => '', 'path' => '/', 'prefix' => 'exp_', 'httponly' => 1, 'secure_cookie' => 0];
var_dump($data);
for($i = 0; $i < sizeof($data); $i++){
if($data[$i]['name'] == 'last_activity'){
array_splice($data, $i, $i);
}
}
var_dump($data);
?>