You cannot use echo to concatenate variables. echo returns nothing. Actually, you have a PHP Parse Error : "syntax error, unexpected 'echo'".
$pn=$_POST['pn'];
$ln=$_POST['ln'];
$logn=$_POST['logn'];
$wellno=$_POST['wellno'];
for($i=0; $i<$chkcount; $i++)
{
$msg = $wellno[$i].':'.$ln[$i].'/'.$pn[$i].'-'.$logn[$i];
do_something_with($msg);
}
If you want to make an array, you could use [] operator to push the value into the array:
$msg=[];
for($i=0; $i<$chkcount; $i++)
{
$msg[] = $wellno[$i].':'.$ln[$i].'/'.$pn[$i].'-'.$logn[$i];
}
print_r($msg);