[Solar-talk] a blond moment please help!
Robert Gonzalez
robert at everah.com
Tue Nov 6 11:36:28 CST 2007
If the 2D array index will always be 'image', you could do something like:
<?php
foreach ($array as $k => $v) {
$array[$k] = $v['index'];
}
?>
If the index varies, then you should be able to do the same thing using the index 0 instead of an associative index.
Of course, there are probably more elegant ways to do it...
Robert
Jeff Surgeson <solar at 3hex.com> wrote: Howzit,
Having a blond moment
array (
"name" => array("image" => "22198103.jpg"),
"type" => array("image" => "image/jpeg"),
"tmp_name" => array ("image" => "/tmp/phpRvGx9q"),
"error" => array ("image" => 0),
"size" => array ("image" => 4670)
);
array (
"name" => "22198103.jpg",
"type" => "image/jpeg",
"tmp_name" => "/tmp/phpRvGx9q",
"error" => 0,
"size" => 4670,
);
How do I programaticly turn array1 into array2 ?
--
...........::::::...........
Jeff Surgeson / South Africa
_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20071106/48153f12/attachment.html
More information about the Solar-talk
mailing list