Pine fences are popular because largely of their affordability. Most of the pine used to build fences is Southern yellow pine that has been treated with chemical preservatives to prevent weather and insect damage, rotting and fungus.
Even though cedar is more durable, pressure-treated pine has a stronger resistance to soil. For this reason, many people choose pine for the fence posts 2 and cedar for the fence panels.
Most treatment companies claim that when treated, most lumber will last more than 20 years. This holds true for pine and spruce, while cedar may last up to 40 years. Whatever money you spend on buying treated wood, you will more than make up for it in the long run.