Question
QUESTION 16 What does the array $soups look like after this code runs? $soups = array(tomato, onion, cheese, chowder); $c = array_pop($soups); array(onion, cheese, chowder)
QUESTION 16
What does the array $soups look like after this code runs?
$soups = array("tomato", "onion", "cheese", "chowder"); $c = array_pop($soups);
array("onion", "cheese", "chowder") | ||
array("tomato", "onion", "cheese") | ||
array("tomato", "onion", "chowder") | ||
array("tomato", "cheese", "chowder")
|
QUESTION 17
"A multidimensional indexed array has two sets of brackets, one for the row and one for the column."
True
False
QUESTION 18
"If a value exists in an array the in_array() function returns 'true', otherwise it returns false."
True
False
QUESTION 19
What does the variable $y hold after these lines execute?
$x = "person5@xyz.com"; $y = strpos($x, "6");
6 isn't present in $x, so none of the other answers are correct | ||
5 | ||
6 | ||
7 | ||
10 |
QUESTION 20
What prints?
$soups = array("tomato", "onion", "cheese", "chowder"); $c = array_pop($soups); echo $c;
tomato; | ||
onion; | ||
cheese; | ||
chowder |
QUESTIOn 21
The ____ function lets you add or remove elements anywhere else in the array.
array_add() | ||
array_split() | ||
array_splice() | ||
array_values() |
QUESTION 22
To remove leading and trailing spaces from a string you would use ____.
ltrim() | ||
trim() | ||
rtrim() | ||
lrtrim() |
QUESTION 23
To capitalize the first character of a string use ____.
str_first() | ||
first() | ||
ucfirst() | ||
uc_initial() |
QUESTION 24
The unset() function removes array elements.
True
False
QUESTION 25
You use the ____ function to return a portion of an array and assign it to another array.
array_slice() | ||
array_set() | ||
array_assign() | ||
array_key() |
QUESTION 26
What is printed?
$str1 = "beets"; echo 'Eat more $str1';
Eat more $str1 | ||
Eat more beets |
QUESTION 27
"The primary use of the include and require statements is to reuse content on multiple web pages by allowing you to insert the content of an external file, called an include file, in your PHP scripts."
True
False
QUESTION 28
"In PHP, you must declare a global variable with the global keyword inside a function definition for the variable to be available within the scope of that function."
True
False
QUESTION 29
What is a sticky form?
a HTML form that is cached on the user's computer and hidden from the user in their browser until it is formally requested. | ||
a form that will not be closed in the user's browser unless it has been submitted first. | ||
a HTML form that retains its values between postbacks. | ||
none of these |
QUESTION 30
Which of the following is true of using printf()? Choose 3.
%0.2f will round the floating point number to 2 decimal places when substituted | ||
%5s will right-justify a short string when substituted | ||
%-5s will left-justify a short string when substituted | ||
%-5s will right-justify a short string when substituted |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started