foreach循环外的循环值

时间:2018-03-15 05:55:46

标签: php

PHP在循环之外返回foreach循环值

$checkmissing = array();
if ($data){
    foreach ( $data as $curDay ){
        $checkmissing['value1'] = $curDay['value1'];
        $checkmissing['value2'] = $curDay['value2'];
        $checkmissing['value3'] = $curDay['value3'];
        $checkmissing['value4'] = $curDay['value4'];
        $checkmissing['value5'] = $curDay['value5'];
        $checkmissing['value6'] = $curDay['value6'];
        $checkmissing['value7'] = $curDay['value7'];
    }
}
return $checkmissing;

我试着这不会返回任何东西

0 个答案:

没有答案