daily pastebin goal
63%
SHARE
TWEET

Untitled

flwkjlwekjfs Jul 13th, 2018 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $thing=array( array( name => "arthur",
  4.                      id => "1",
  5.                      blah => 1.0
  6.                    ),
  7.                array( name => "bob",
  8.                      id => "2",
  9.                      blah => 3.0
  10.                    )
  11.             );
  12.  
  13. foreach ($thing as $key => $arr){
  14.     if ($arr['id'] === "2"){
  15.         $thing[$key]['name'] = 'kdsflkjdf';
  16.     }
  17. }
  18.  
  19. print_r($thing);
  20.  
  21. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top