fork download
  1. <?php
  2.  
  3. $array = array(
  4. 'item-img-list' => array(
  5. 'image-type' => 1,
  6. 'image-url' => 'http://i...content-available-to-author-only...g.pl/...'
  7. ),
  8. 'image-type' => 2,
  9. 'image-url' => 'http://i...content-available-to-author-only...g.pl/...'
  10. ),
  11. 'image-type' => 3,
  12. 'image-url' => 'http://i...content-available-to-author-only...g.pl/...'
  13. )
  14. )
  15. );
  16. $newArray = array();
  17.  
  18. foreach($array['item-img-list'] as $k=>$v){
  19. $newArray[$v['image-type']] = $v['image-url'];
  20. }
  21. print_r($newArray);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [1] => http://i...content-available-to-author-only...g.pl/...
    [2] => http://i...content-available-to-author-only...g.pl/...
    [3] => http://i...content-available-to-author-only...g.pl/...
)