$arr_main_array = array('foo-test' => 123, 'other-test' => 456, 'foo-result' => 789);foreach($arr_main_array as $key => $value){ $exp_key = explode('-', $key); if($exp_key[0] == 'foo'){ $arr_result[] = $value; }}if(isset($arr_result)){ print_r($arr_result);}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)