Guest User

Untitled

a guest
Oct 10th, 2011
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $arr = array(0 => array('id' => 126, 'type' => 'txt'), 1 => array('id' => 586, 'type' => 'txt'));
  3. $res = array();
  4. foreach ($arr as $k => $v)
  5. {
  6.     $res[] = array("data_{$k}_id" => $v['id'], "data_{$k}_type" => $v['type']);
  7. }
  8. print_r($res);
  9.  
RAW Paste Data