Font size
WorksheetsPHP Assessment 1
Total questions: 14
Worksheet time: 33mins
In PHP, variable names are case-sensitive. (T/F)
True
False
The elseif keyword can be written as else if in PHP. (T/F
True
False
The foreach loop can only be used with arrays. (T/F)
True
False
In PHP, arrays can store elements of different data types. (T/F)
True
False
The if statement can only be used with integer values. (T/F)
True
False
To declare a variable in PHP, you must use the (a) symbol before the variable name.
The (a) operator is used to concatenate strings in PHP.
In a for loop, the three expressions are separated by (a) .
To access the length or to count the number of an array in PHP, you can use the (a) function.
Find and fix the error in the following code:
Correct the syntax error in this array declaration:
Fix the loop to properly iterate through the array:
Correct the code to properly check if the key exists in the array:
Which of the following is NOT a valid way to start a PHP code block?
<?php
<?=
<!--
<?
