Please take a look at the code
$Dss=array(0,0,0,0,0,0,0,0,0,0);
for ($i=1;$i<=12;$iPP){ //12
//$sql="";
$row["DSS"] = "1,2,3,4,5,6,7,8,9,10|11,12,13,14,15,16,17,18,19,20"; //
$Dsx=explode("|",$row["DSS"]); //|
foreach ($Dsx as $Ds=>$v){ //
if (strpos($v,",")){ //
$ns=array_pad(explode(",",$v),15,0); //15
for($c=0;$c<15;$cPP){
//$Dss[$c]=floatval($Dss[$c]); //,0 ???
//$ns[$c]=floatval($ns[$c]); //,0 ???
$Dss[$c].=$ns[$c]; //,+= 0 ???
}
}
}
}
var_dump($Dss[0]);
if you run it according to the above code, the string (9) "0111" value is normal. But there is no type conversion. As soon as it is converted, it is 0, and the result I want is 12. Solve