Ahh.. alot of people have that fear.. as you know it's not easy to get rid of a fear so you gotta approach your fears slowly. A rule of thumb with dogs... if you run, they WILL chase after you. Something you gotta understand about them, the world is a big game and they are the centre of the world... Dogs are very selfish creatures (as any animal is) and they dont think anything exists on the outside of them so they will act on impulse. Making any sudden movements or moving quickly will hype up a dog and they'll be happy to play.
So first up, if you dont wanna be scared of dogs, dont run away, walk slowly away and dont make eye contact, that way they know you dont want a game. If you want to overcome the fear and you do see a dog owner with a dog, ask them if the dog is agressive and if you may pat it. Usually the dog isnt agressive. If a dog is coming at you and it's not being restrained by a leash and you are fearful, dont make eye contact, turn your back, DONT run!! Walk slowly.. can't emphasise this any more lol!! Dogs have an awesome ability to sense people's emotions so the second you show fear, they WILL know..., always remain calm and things wont go wrong
Dogs are awesome but like all fears, it's a fear for you.. Take time and overcome it slowly, find a friend that you can trust with a dog and get them to introduce it to you. Most dogs wont bite, especially un-provoked,. puppies might bite playfully.. A dog will most like warn you before it attacks too with a growl, eye contact and showing it's teeth. Dont mistake an agression growl with a play growl also..