Paul first went to Philippi on his second journey in about AD 50 (Acts 16:12) and he baptised the first few believers there. It was on that first visit that he ended up in a Philippian jail with Silas after a severe beating. He was in Philippi again about five years later while on his third journey (Acts 20:1-2), and once more on his return journey (Acts 20:6). So he would have known some members of the Philippian church quite well, especially Lydia his first convert there.
The letter to the Philippians was probably written about AD 61 while Paul was under house arrest in Rome (Acts 28:16). So he had known some of the people he was writing to for more than ten years.
From that letter, it seems Paul also intended to visit Philippi again after he was released (Philippians 2:23-24) and probably did (see 1 Timothy 1:3).