<?php
//Enter your code here, enjoy!
// I princippet headings
$headings = array("foo" => "bar", "blabla" => 89009, "id" => "imtheid");
// Hvis headings har en key med id så lad os sætte en variable og fjerne key & value fra nuværende array
if($headings["id"]) {
$temp_id = $headings["id"];
unset($headings["id"]);
$headings = array_merge(["key1" => $temp_id], $headings);
}
foreach( $headings as $key => $value ){
echo $key."\t=>\t".$value."\n";
}
Comments