SHARE
TWEET

Untitled

a guest Jun 16th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [
  2.  {
  3.   'city':'xx',
  4.   'zone':'yy',
  5.   'person_info':{
  6.                   'person_on_zone':'p1',
  7.                   'person_on_zone':'p2',
  8.                   'person_on_zone':'p3',
  9.                 }
  10.  },
  11.  {
  12.   'city':'xx',
  13.   'zone':'ww',
  14.   'person_info':{
  15.                   'person_on_zone':'p1'
  16.                 }
  17.  },
  18. ]
  19.      
  20. foreach ($val as $v){
  21.                     $new_array['city'] = $v['city'];
  22.                     $new_array['zone'] = $v['zone'];
  23.                     foreach ($val as $v2){
  24.                         $new_array['person_info'] = $v['person_on_zone'];
  25.                     }
  26.                 }
  27.                 json_encode($new_array);
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