Hello,
I'm trying to pull 2 specific values from the array below, the "name" & the "tmp_name":
array(5) { ["name"]=> array(1) { [0]=> string(10) "orange.jpg" } ["type"]=> array(1) { [0]=> string(10) "image/jpeg" } ["tmp_name"]=> array(1) { [0]=> string(14) "/tmp/phpzVAl3n" } ["error"]=> array(1) { [0]=> int(0) } ["size"]=> array(1) { [0]=> int(13748) } }
I tried different variations with the foreach loop and I'm not getting the results i'm looking to get.
any ideas on how i can pull the 2 values out? in this case $v1= "orange.jpg" and $v2="/tmp/phpzVAl3n"
PHP Code:
foreach($testArray as $key1 => $value)
{ if(is_array($value))
{ foreach ($value as $key2 => $val2)
{ echo $key1 ." ". $key2. " ". $val2; }
}
}
Bookmarks