Ask everyone about the array question. The title should be long... PHPcode $ arr = array ('name' = & gt; 'A', 'id' = & gt; '000000'). For more information, see arrays, the title must be long...
PHP code
$arr=array( array('name' => 'aa','id' => '456'), array('name' => 'bb','id' => '25',), array('name' => 'cc','id' => '25',), array('name' => 'dd','id' => '456',), );
How can I retrieve the name with the same ID. For example, if the array prompts that the IDs of aa and dd are the same, the IDs of bb and cc are the same.
------ Solution --------------------
You have done it yourself ~!~
PHP code
$newArr=array(); foreach($deals_info as $key=>$value){ if(!isset($newArr[$value['id']])){ $newArr[$value['id']][]=$value['name']; }else{ foreach($newArr as $k=>$v){ if($k==$value['id'] and !in_array($value['name'],$newArr[$k])){ $newArr[$k][]=$value['name']; } } } }