How to skip the 1st key in an array loop?

后端 未结 12 1371
情歌与酒
情歌与酒 2020-12-03 04:29

I have the following code:

if ($_POST[\'submit\'] == \"Next\") {
    foreach($_POST[\'info\'] as $key => $value) {
        echo $value;
    }
}

12条回答
  •  不思量自难忘°
    2020-12-03 04:38

    
    
    foreach($_POST['info'] as $key=>$value) {
        if ($key == 0) { //or what ever the first key you're using is
            continue;
        }  else { 
            echo $value;
        }
    }
    
    

提交回复
热议问题