COMPUTER FUNDAMENTALS

COMPUTER NETWORKS AND COMMUNICATIONS

INTERNET AND WEB TECHNOLOGIES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of these statements were the rule of declaring variable in PHP?
A
All variable names have a dollar sign ($) in front of them. This tells PHP that it is a variable name.
B
Variable names must begin with a letter or an underscore. They cannot begin with a number.
C
Variable names can be any length.
D
Variable names can include letters, numbers, and underscores only.
E
All of the above
Explanation: 

Detailed explanation-1: -A variable starts with the $ sign, followed by the name of the variable. A variable name must start with a letter or the underscore character. A variable name cannot start with a number. A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and ) More items

Detailed explanation-2: -All variable names must begin with a letter of the alphabet or an underscore( ). After the first initial letter, variable names can also contain letters and numbers. Variable names are case sensitive. No spaces or special characters are allowed.

Detailed explanation-3: -In programming, variable is a storage location where data will be stored. In php we declared variable using $(Dollar) symbol.

Detailed explanation-4: -true! PHP is a case sensitive language. Q 9-Which of the following is true about php variables? A-All variables in PHP are denoted with a leading dollar sign ($).

There is 1 question to complete.