I'd write as follows. But since you have the original code, you can simply try to plug in a few sample values and compare the results.
function calc_pitchhor($lslathor, $nrslatver) {
do {
$pitchhor = ($lslathor/($nrslatver+1));
$lslathor = $pitchhor*($nrslatver+1);
++$nrslatver;
} while($pitchhor > 72)
return $pitchhor;
}
$lslathor = 1780;
$nrslatver = 34;
echo "HORIZONTAL PITCH is equal to: ", calc_pitchhor($slat_length_h, $slat_qty_v);