Wayne Dyer said that and he was absolutely right!
I read somewhere that we are most like the five people we hang around with the most. Why is that? Well, if we spend a lot of time around people that think a certain way, we tend to pick up the way they think, from the words they say and the actions they take. It's inevitable because it's human nature to copy what we see and hear other people do. Even if it ultimately is a destructive behaviour. We do this because that's the way our primitive brains are wired to learn. So it's not hard to see that if our state of mind is a certain way, so will be our thoughts, words, and actions, which ultimately gives us the results we get in our life. If you're unhappy with the state of your life at the moment, try changing the way you think. Simple, but not easy. Try resting in a quiet place for a few minutes each day and visualize what you would like your life to be like, then let it go. No need to try to hold that thought all day, just think it a few minutes each day. You'll be surprised how much your thoughts go to that place automatically after a couple of weeks of that simple visualization. And once your thoughts change...well, you know the rest of the story.