- print_r: documentation ( source)
- array_shift: documentation ( source)
<?php
$arr = [0 => "TEST ", 1 => "1 ", 2 => "2 ", 3 => "3 "];
$temp = array_shift($arr);
$res = [];
foreach ($arr as $key => $value) {
$res[] = ["NAME" => $temp, "VALUE" => $value];
}
print_r($res);die;