Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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";
- }
Advertisement
Add Comment
Please, Sign In to add comment