PHP grabbing an array from another array -
i have array so
array ( [0] => array ( [64579] => array ( [title] => title [description] => blah, blah, blah [image] => array ( [original] => array ( [src] => image1.jpg ) [reference] => array ( [src] => image1_big.jpg ) [thumb] => array ( [src] => image1_thumb.jpg ) ) what trying grab src of reference image...i have tried following
foreach($images $row => $value){ $gallery[] = $value['image']; } but returns so
array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => [10] => [11] => [12] => [13] => [14] => [15] => [16] => [17] => [18] => [19] => [20] => [21] => [22] => [23] => [24] => [25] => [26] => [27] => [28] => [29] => [30] => [31] => [32] => [33] => [34] => [35] => [36] => [37] => [38] => [39] => [40] => [41] => [42] => [43] => [44] => [45] => [46] => [47] => [48] => ) what have add reference image src new gallery array?
what have 3 dimensional array... need wrap in loop..
foreach($images $imagegrouplist) foreach($imagegrouplist $row => $value){ $gallery[] = $value['image']; } } of if top level array ever has single element can iterate of
foreach($images[0] $row => $value){ $gallery[] = $value['image']; }
Comments
Post a Comment