Questions about array Values!
PHP Code
Known quantity group $info=array ();//Output Print_r ($info);//result Array ( [0] = = Array ( [name] + 8.gif [MD5] = b68d88dbdfc9d0af2e0bbd85a4ccd28f [Savename] = 20120602080557_452.gif [size] = 1 [Type] = = Image/gif [OriginalHeight] = [ originalwidth] = [ 1] = = Array ( [name ] = 9.gif [MD5] = 4988f85ebebf82f56d70eeaf39a67016 [Savename] = 20120602080557_776.gif [ Size] = 2 [Type] = = Image/gif [originalheight] [ originalwidth] = (+ )
I want to take out the corresponding value of the savename, how to do
------Solution--------------------
PHP Code
foreach ($info as $value) {foreach ($value as $getValue) {echo $getValue [' Savename '];}}
------Solution--------------------
foreach ($info as $v) $temp []= $v [' Savename '];
Print_r ($temp);
------Solution--------------------
It appears that name is similar to the unique field, and you want to remove the Savename field that corresponds to name. If so, you need to receive the Name field value you gave, when you submit it with the Post form.
A two-dimensional array. One foreach judgment is enough.
PHP code
$a =array (Array (' name ' = ' 8.gif ', ' MD5 ' = ' b68d88dbdfc9d0af2e0bbd85a4ccd28f ', ' savename ' = ' 20120602080557_452.gif ', ' s Ize ' = 1, ' type ' = ' image/gif ', ' originalheight ', ' Originalwi DTH ' = + ', Array (' name ' = ' 9.gif ', ' md5 ' = ' 4988f85ebebf82f56d70eeaf39a67 ') 016 ', ' savename ' = ' 20120602080557_776.gif ', ' size ' = 2, ' type ' = ' imag E/gif ', ' originalheight ' = (' originalwidth '); foreach ($a as $k = = $V) {if ($v [' Name ']===$_post[' yourname ']) {//Make $_post[' yourname ']= ' 8.gif ', output $v [' Savename ']=20120602080557_452. Gifecho ' $v ['. ' Savename '. ' = '. $v [' Savename ']. '
';