in reply to Better solution for code reduction?

You only execute Block1 if $condition1 and $condition2 is true.
if ($condition1 && $condition2) { #Block1 } else { #Block2 }