$Pno.$Plongitude.$Plantitude.$Pradius.$SCno获取不了值?

<?php
echo 'httptest page ';

@$Action = $_POST[Action];
@$UserName = $_POST[UserName];
@$UserPassword = $_POST[UserPassword];

if( $Action == 'Update' ){

@$PlotCount = $_POST[PlotCount];

for($i = 0; $i < $PlotCount ; $i++){
@$Pno = $_POST[Pno.$i];
@$Plongitude = $_POST[Plongitude.$i];
@$Plantitude = $_POST[Plantitude.$i];
@$Pradius = $_POST[Pradius.$i];

@$SCno = $_POST[SCno.$i];

echo $i.$Pno.$Plongitude.$Plantitude.$Pradius.$SCno;

if($SCno != 'null'){
@$SCaltitude = $_POST[SCaltitude.$i];
@$SCaspect = $_POST[SCaspect.$i];
@$SCslope = $_POST[SCslope.$i];
@$SCsoilThickness = $_POST[SCsoilThickness.$i];
@$SCstoneAmount = $_POST[SCstoneAmount.$i];
@$SCsoilType = $_POST[SCsoilType.$i];
}
}

// echo $Action.$PlotCount.$Pno.$Plongitude.$Plantitude.$Pradius.$SCno;
}

?>
就是$Pno.$Plongitude.$Plantitude.$Pradius.$SCno这个获取不了值,如果在循环外可以获取值

GCT1015
浏览 154回答 1
1回答

慕斯王

你在html页建议这样写<input type="hao[]" value="" />input type="hao[]" value />传过来是一个连续的数组?如果是的$j=0;for($i=0;$i<count($_POST['hao'])){echo $_POST['hao'][$j];}
打开App,查看更多内容
随时随地看视频慕课网APP