+ 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

17th May 2017, 10:15 PM
TrueJu
TrueJu - avatar
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.
17th May 2017, 10:35 PM
Mario L.
Mario L. - avatar
+ 2
ok thank you
17th May 2017, 10:37 PM
TrueJu
TrueJu - avatar
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.
18th May 2017, 5:37 AM
Benoit Ranque
Benoit Ranque - avatar