Browse Source

foreach-assignment.php

Brennen Bearnes 2 months ago
parent
commit
b98f3ed32f
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      home/fragments/foreach-assignment.php

+ 11
- 0
home/fragments/foreach-assignment.php View File

@@ -0,0 +1,11 @@
1
+<?php
2
+error_reporting(E_ALL);
3
+ini_set('display_errors', 1);
4
+$bar = [
5
+  'thing' => 'otherthing',
6
+];
7
+$foo = [];
8
+foreach ($bar as $key => $value) {
9
+  $foo[$key] = $value;
10
+}
11
+print_r($bar);

Loading…
Cancel
Save