A Question about PHP


#1

So I have done a little bit of PHP so far and I'd like to ask, everything I'm doing with PHP so far I can do in JavaScript. So what is the point of using PHP when I can just use JavaScript?


#2

JavaScript codes are executed by your web browser, like animations, your browser does the processing while PHP runs on the server, where your webpage is stored.

Remember: PHP is a server-side scripting language. JavaScript is run client-side.
PHP and Javascirpt are entirely different languages, made for different needs.

I suggest have some research about PHP and Javascript for your better understanding.