cutting and pasting sections of code from Dreamweaver..
I also noticed this. Tab stops in Dreamweaver, regardless of how you've set them, equal about 10 spaces in the forum message window. On the other hand, if you've indented the code yourself (by spacing twice, for example), then it stays the same.
I'd also agree with previous statements about code formatting. Formatting like this makes me dizzy:
while(($row = mysql_fetch_assoc($rs)) != false){
if(($row['Actual_Incentive'] + $row['CSP_Incentive'] + $row['Manual_Adjustment']) < $row['Guarantee_Amount']){
if($row['GM_Dollar'] >= $row['GM_Quota']){
$incentive = 0;
$guarantee = $row['Guarantee_Amount'];
}else{
$incentive = $row['Actual_Incentive'] + $row['CSP_Incentive'] + $row['Manual_Adjustment'];
$guarantee = -1;
}
}else{
Etc...That's from another person's code I'm currently dealing with.
I've come to basically the same formatting standard as mentioned above even though nobody ever told me, "this is the way to do it." The only variation I have is that I like to indent the braces because it "looks" cleaner to me:
while($row = mysql_fetch_assoc($rs))
{
extract($row);
if($Actual_Incentive + $CSP_Incentive + $Manual_Adjustment < $Guarantee_Amount)
{
if($GM_Dollar'] >= $GM_Quota)
{
$incentive = 0;
$guarantee = $Guarantee_Amount;
}
else
{
$incentive = $Actual_Incentive + $CSP_Incentive + $Manual_Adjustment;
$guarantee = -1;
}
}
else
{
$incentive = $Actual_Incentive + $CSP_Incentive + $Manual_Adjustment;
$guarantee = 0;
}
}
The condition/loop statements stick out better - for me at least. But to each his/her own, as long as it is clean.