+ 2
Website
A website needs html css and javascript but can i use php as javascript? I wabt to learn new things so don't judge me for bad questions ;D
3 Respostas
+ 6
for some things you can use either php or JavaScript, like form validation for example. but php can't animate elements or manipulate objects. JavaScript can't be used for interaction with mySQL or saving files on the server.
so there are a lot of differences.
+ 2
ok thank you
0
I hate to correct you but you can perfectly use javascript on the server... with nodejs. saves you learning a language
also you cannot use php as javascript for one reason: php generates html files then sends them to the client, while javascript manipulates html files in the browser itself. so php cannot change anything without reloading the page.