function get_arbeit_yuexin($screen){
$data = get_money_data_s($screen,2);
dump($data['url_id']);//$data['url_id']的格式是:5,6,7,10,11
if($data['url_id']){
$url_id = explode(',',$data['url_id']);//拆分$data['url_id']的数据
foreach($data['data'] as $k=>$r){//$data['data'] 是【a】表中的所有数据,循环$data['data']数据
foreach($url_id as $kk=>$rr){//循环拆分$data['url_id']后的数据
if($r['id'] == $rr){//根据$data['url_id']的数据 判断与【a】表相等的数据
$data_title[$k] = $r['val'];
$val = $r['val'];
dump($val);
//拆解处理相等的数据
$money = explode('-',$val);
$egt[$kk] = array('egt',$money[0]);
$elt[$kk] = array('elt',$money[1]);
}
}
}
/*dump($egt);
dump($elt);*/
/*将条件合并 并每一个条件都带着 【and】*/
foreach($egt as $k=>$r){
$arr = array($r,$elt[$k]);
$arr_1[$k] = array_merge($arr,array(0=>'and'));
}
/*最后再拼接上【or】*/
$data = array_merge($arr_1,array(0=>'or'));
dump($data);
if($data){
return $data;
}else{
return array('neq','');
}
}else{
return array('neq','');
}
}
如果帮到你给个赞鼓励一下吧