Above, the Apostle described the progress he has made; here he deals with the joy born of this progress: first, the cause of this joy; secondly, the joy itself (1:18b).
Sometimes it happens that joy arises from a good cause, and this directly and of itself; sometimes from an evil cause, and this indirectly and by accident. For when it springs from a good cause, one should rejoice both in the effect and in the cause, as in the case of giving an alms for the glory of God; but when it springs from an evil cause, one should rejoice in the effect but not in the cause, as in the redemption by Chris...t, since it came about from the crime committed by Judas and the Jews. The same thing happens in the Church when something beneficial results from good preachers with a good intention, and from evil preachers with an evil intention; nevertheless, one should rejoice in both cases, as has been said. He says, therefore: what then? Only that in every way, whether in pretence or in truth, Christ is proclaimed; and in that I rejoice. Yes, and I shall rejoice. One announces Christ in pretense when he does not chiefly aim at this but at something else, as profit or glory; "He who is estranged seeks pretexts" (Prov. 18:1); but in truth, when it is done with a right intention: "Remember now, O Lord, I beseech thee, how I have walked before thee in faithfulness and with a whole heart, and have done what is good in thy sight" (Is. 38:3). But either way the results are good for the Church; hence he says, Christ is proclaimed, and in that I rejoice, because if something other than Christ were proclaimed, there would be reason for concern. This happens when false doctrine is taught; "The shepherd who teaches for the sake of the truth should be loved; the hireling who teaches for gain should be tolerated; but the one who teaches what is false must be expelled" (Augustine).
Then he mentions the joy which followed, when he says, in that, namely, that my chains are manifested for the sake of Christ, I rejoice, at present in the fact that Christ is preached: "If you loved me, you would have rejoiced" (Jn. 14:28); and I shall rejoice in the future: "They shall obtain joy and gladness" (Is. 51:11).
Source: Commentary on Philippians