Q1 With the implode() function, the first parameter is the name of the array you
ID: 3600235 • Letter: Q
Question
Q1
With the implode() function, the first parameter is the name of the array you want to modify.
True
False
QUESTION 2
What determines where in code a variable can be used?.
none of these
variable type
variable scope
variable duration
QUESTION 3
The array_key_exists() function determines if a given array index or key exists.
True
False
QUESTION 4
A function executes automatically when the page loads.
True
False
QUESTION 5
What does the array look like after this code runs?
$soups = array("tomato", "onion");
array_push($soups, "cheese", "chowder");
array("onion", "cheese")
array("cheese", "chowder", "tomato", "onion")
array("tomato", "onion", "cheese", "chowder")
array("tomato", "chowder")
QUESTION 6
To create an array you can use the _______.
array constructor
array_maker() function
array_make() function
make() function
QUESTION 7
Which array would this code produce?
$soups = array("tomato", "onion", "cheese", "chowder");
$c = array_shift($soups);
array("tomato", "onion", "cheese", "chowder");
array("onion", "cheese", "chowder");
array("tomato", "onion", "cheese");
array("chowder", "tomato", "onion", "cheese");
QUESTION 8
The $_POST[] array is an associative array called a superglobal array.
True
False
QUESTION 9
What does this code output?
$x = explode("=", "fe=fi=fo=fum");
echo $x[1];
fe
fi
fo
fum
QUESTION 10
"The heredoc structure acts like a double quoted string, but without the quotes. It opens with <<< then an identifier then a newline. The structrure is closes with a final identifier."
True
False
QUESTION 11
Which of the following are used to convert between strings and arrays or arrays and strings? Choose 3. Look them up if necessary.
join()
detatch()
implode()
explode()
QUESTION 12
A multidimensional array in PHP is essentially ____.
just a single array
an array of arrays
you can't have such a thing in PHP
an associative array
QUESTION 13
When this code runs, what is the value of $y?
$user = "Don";
$pw = "12345";
$y = sprintf("SELECT * FROM users WHERE user='%s' AND sword='%s'", $user, $pw);
None of the other answers are correct
SELECT * FROM users WHERE user=Don AND password=12345
SELECT * FROM users WHERE user='Don' AND password='12345'
"""SELECT * FROM users WHERE user='%s' AND password='%s'"""
QUESTION 14
A static variable ____.
is the same thing as a global variable
is local to a function but hold their value between function calls
cannot have its value changed once it has been assigned a value
will always have the value NULL
QUESTION 15
What is the value of $y when this code runs?
$x = "Hello visitor";
$z = "visitor";
$y = str_replace($z, "Susan", $x);
hello visitor Susan
Hello Susan
Hello Susan visitor
*
none of these
variable type
variable scope
variable duration
Explanation / Answer
Answer:-
1) False
2) variable scope
3) True
4) False
5) array("tomato", "onion", "cheese", "chowder")
6) array constructor
7) array("onion", "cheese", "chowder");
8) True
9) fi
10) True
11) explode()
12) an array of arrays
13) None of the other answers are correct
14) cannot have its value changed once it has been assigned a value
15) Hello Susan
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.