+1 vote
in PHP by
Which of the following variable name is invalid?

a) $newVar

b) $new_Var

c) $new-var

d) All of the above

1 Answer

0 votes
by

c) $new-var

Description: In PHP, a variable is declared using a $ sign followed by the variable name. A variable name must start with a letter or underscore (_) character.

A PHP variable name cannot contain spaces.

Related questions

+1 vote
asked May 13, 2022 in PHP by john ganales
0 votes
asked Mar 19, 2020 in PHP by DavidAnderson
...