假如我要筛选 TRADE_STATUS =>交易失败这四个字,然后关于交易失败的这个组全部提取出来。生成新的组
本人菜鸟,我已经看了几十篇帖子,到目前也没有解决,本人愚钝,还望大哥大姐能给个完整的代码。
Array ( [0] => Array ( [ORDER_DATE] => 2018-04-16 [ORDER_NUMBER] => 148548269824540472 [SHOP_NAME] => 友诚票务 [COMMODITY_CONTENT] => 友诚票务 高铁G1019 广州南-深圳北 [COMMODITY_PRICE] => 74.50 [COMMODITY_NUMBER] => 1 [COMMODITY_STATUS] => 投诉卖家 [COMMODITY_PAY] => ¥74.50(含运费:¥0.00) [TRADE_STATUS] => 交易关闭,订单详情 [USER_ID] => 6fb8dabada042e58386a21a1516bc50e ) [1] => Array ( [ORDER_DATE] => 2018-04-12 [ORDER_NUMBER] => 147644907367540472 [SHOP_NAME] => 寻梦网络服务 [COMMODITY_CONTENT] => 爬虫代写,信息抓取,正则表达式代写,程序定制,数据采集抓取软件 [交易快照] [COMMODITY_PRICE] => 20.00 [COMMODITY_NUMBER] => 100 [COMMODITY_STATUS] => 查看退款,投诉卖家 [COMMODITY_PAY] => ¥2000.00(虚拟物品) [TRADE_STATUS] => 交易关闭,订单详情 [USER_ID] => 6fb8dabada042e58386a21a1516bc50e ) [2] => Array ( [ORDER_DATE] => 2018-04-05 [ORDER_NUMBER] => 553813995204 [SHOP_NAME] => 飞猪机票自营 [COMMODITY_CONTENT] => 深圳航空 ZH9518 上海-深圳单程起飞时间:2018-04-05 21:00:00 [COMMODITY_PRICE] => 544.00 [COMMODITY_NUMBER] => 1 [COMMODITY_STATUS] => 投诉 [COMMODITY_PAY] => ¥594.00(含运费:0.00) [TRADE_STATUS] => 订票成功,订单详情 [USER_ID] => 6fb8dabada042e58386a21a1516bc50e )
自己解决了
$keywords = '关闭';
$arrays = $this->taobao_yanhao_model_c->listinfo($where,'*',0,0, 1000,'',$this->taobao_yanhao_model->page_size);
$arr = array();
foreach($arrays as $key=>$values ){
foreach ( $values as $s )
if (strstr( $s, $keywords ) !== false ){
array_push($arr, $values);
}
}
print_r($arr);