“You do not really understand something unless you can explain it to your grandmother.” — Albert Einstein
Good programmers write code that humans can understand. We use programming syntax and logic to write down some piece of code in order to accomplish a specific task. Before you start learning PHP you need a basic understanding of programming. If you already have it, great. If not there are plenty of articles and tutorials to help you. When you know how to write a simple code in PHP, you can start building your server-side applications.
How long it takes to learn coding depends on your approach. Generally, it takes about 3 to 6 months to learn the basics of coding. You can learn coding faster or slower depending on your pace.