+ 2
Is it better to use PHP than JS?
PHP and JS
3 Réponses
+ 1
Charlie, it's not a correct question, both have different working domain and are generally used for same softwares,
php is a server side scripting language it ll help u interact with the servers or online services, it runs on the server
but JavaScript is a client side scripting language it helps to make ur webpage dynamic and better interact with users. it runs on users browser
+ 1
You'll probably want to use both; PHP on server side and JS on client side.
You will need a webserver for PHP whereas with JS you can add plain JS to an HTML file and open it in your browser without needing a server. Basically what a server does is interpret the PHP and sends the interpretation to the client. The interpretation could contain JS and HTML.
- 2
php