Advertisement
Guest User

Untitled

a guest
Oct 10th, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement