Complete the code to declare a variable named $name with the value "John".
<?php $[1] = "John"; ?>
In PHP, variable names must start with a letter or underscore and can contain letters, numbers, and underscores. $name is valid.
Complete the code to declare a variable named $user_age and assign it the value 30.
<?php $[1] = 30; ?>
Underscores are allowed in PHP variable names, so $user_age is valid.
Fix the error in the variable declaration to make it valid.
<?php $[1] = "Hello"; ?>
Variable names can start with an underscore and contain letters and numbers, so $_greeting is valid.
Fill both blanks to declare a variable named $totalCount and assign it the value 100.
<?php $[1] = [2]; ?>
The variable name $totalCount is valid and assigning the integer 100 is correct.
Fill all three blanks to create an associative array with variable $person having keys name and age.
<?php $[1] = [ '[2]' => 'Alice', '[3]' => 25 ]; ?>
The variable $person holds an associative array with keys name and age, which are valid string keys.