you can declare a variable by the var statement


You can declare a variable by the var statement such as:

var strname = some value

You can also declare a variable with simply assigning a value to the variable. Although, if you do not assign a value & simply employ the variable then it leads to an error.

Strname = some value

You can assign a value to a variable as:

var strname = "Hello"

Or

strname = "Hello"

The variable name is onto the left hand side of the expression & the value you desired to assign to variable is on to the right side. Therefore the variable "strname" illustrated above gets the value "Hello" assigned to it.

Request for Solution File

Ask an Expert for Answer!!
PHP Web Programming: you can declare a variable by the var statement
Reference No:- TGS0416458

Expected delivery within 24 Hours