Difference Between PHP and Javascript

793 0

$1*/ mo hosting! Get going with GoDaddy!

Difference Between PHP and Javascript
PHP Javascript
Statement end in ; ;
Variables $variableName variableName
Declare variables by  $variableName="String or number here"; variableName="String or number here";
Print to screen by echo $variableName or  print $variableName console.log(variableName);
Concatenate This string is concatenated with ." $variableName."like so."; This string is concatenated with + $variableName  +"like so.";
Declare a function by function functionName(parameter){ // code here} var functionName= function(parameter){ }
Call a function by functionName(input here) functionName(input here)
In this article

Join the Conversation


Share