It is challenging to see that Paul wrote to the Philippians so much about joy while he was in a prison. It's one thing to preach about joy when all our circumstances are comfortable. It is quite another thing to write about it when our circumstances are difficult. Paul's words in Philippians 1:4; 4:4 teach us that it is possible for a Christian to have joy under all circumstances. That is the mind and attitude of Christ.
In Philippians 1:6,7 Apostle Paul says, "I am convinced that what God has begun in you, He will complete in the day of Christ. It is right for me to feel this way about you because I have you in my heart". If you are a preacher and you want to have a prophetic word for God's people, then you must have two things in your heart at all times. You must have God's Word and God's people in your heart. If you have only God's word in your heart but no love for His people, then God will not give you a word for them. In the same way, if you love God's people but your heart is not filled with God's word, then again, He will not give you a word for them. Paul carried believers on his heart, just like Aaron had the names of the 12 tribes of Israel on the breastplate over his heart. As a human being, Paul could not possibly carry every believer in the world on his heart. He carried only those for whom God had given him a responsibility. When we have God's Word and the people He has given us responsibility to care for, in our hearts, then even one sentence that we speak will bless them.
In Philippians 2:3 Paul exhorts them: Never do anything from selfishness and Pride. In Philippians 2:5 Paul goes on to say, "Have this mind (attitude) in you which was in Christ Jesus". You can live all your life with just this one verse. You don't need any other verse in the Bible for transformation. In every situation ask yourself, "Do I have the attitude of Christ here?" Judge your past actions by this question, "Did I have the attitude of Christ there?"
In Philippians 3:8 Paul said that everything on earth, including human righteousness, was actually garbage and rubbish compared to Christ. Have you seen that yourself? Have you seen that all the money in the world is rubbish compared to Christ? Have you seen that all the honour of man is rubbish compared to Christ? Have you seen that all earthly comfort is rubbish compared to Christ? Doing God's will, being in the place where God wants you to be, growing in Christlikeness and fulfilling the ministry that God has for you - those are the only things that matters from eternity's standpoint. Paul goes on to speak about his great longing in life. It was not to become a famous preacher or to be well known. All that was garbage to him. His earnest desire was to know Christ more, to know more of the power of His resurrection and more of the fellowship of His sufferings (Philippians 3:10).
Then Paul says one more challenging thing: "Be anxious about nothing" (Philippians 4:6). That is yet another mountain-peak to climb. Anxiety comes so easily to all of us. It comes when you don't have enough money to meet your needs till the end of the month. When your children are late in coming back from school, you begin to be anxious. If you are a young person, and growing older, but see no prospects of marriage, you can become anxious. Many things can cause us anxiety. We may never reach the peak of this mountain on earth. But we should press on, so that our faith and confidence in God grows, so that whenever we are anxious about anything, we take it to the Lord in prayer with thanksgiving.
Paul exhorted the Philippians to always set your minds on the things that are excellent (Philippians 4:8). Paul then tells us that in his own life he has learnt the secret of being content with much or little, whatever God, in His wisdom, chose to give him (Philippians 4:11, 12). This is indeed a secret - for most Christians have not learnt it. Paul then makes this triumphant declaration: "I can do all things through Christ Who strengthens me" (Philippians 4:13). As Christ strengthens us, we will be able to rejoice always and be anxious for nothing.