“And what you learned and received and heard and saw in me, do these things. And the God of peace will be with you.”
Paul preached the true gospel and gave the example. The Philippians needed to hear and observe. Then, they should practice those same things. Only then could they count on God’s presence.
One cannot be taught wrong and practice correctly. One must first learn in order to do the right thing. Having God’s presence depends on this.