Question 30 3 pts You have an existing associative array, $students, and want to remove the ‘grade’ key/value pair from it. What is the correct PHP statement to do this? Note: I do not want the grade element set to blank or null. I want the grade element removed from the array. $students[‘grade’] = null; unset($students->grade) $students->unset(‘password’) $students->grade = null; None of the answers are correct $students->unset(‘grade’) unset($students[‘grade’]) unset($students[‘password’]) $students->grade->delete() Question 33 3 pts What CSS property is used to changed an inline element into a block element? O inline => block; O display: inline-block; O None of the answers are correct o display: inline; O mode: block; o convert: block; o display: block; Question 42 3 pts Which function, commonly used in PHP, escapes special characters for a SQL statement which helps web developers defend against hackers using SQL injections? Note: Used the one shown in class. mysqli_escape_string($userInput) shal($userInput) strcmp($userInput) prevent_hackers($userInput) new mysqli($userInput) escape_injections($userInput) O None of the answers are correct $mysqli->real_escape_string($userInput) Question 44 3 pts What is the main idea behind a MVC architectural pattern? Note: Select all that apply. We must have a good life style in order to make solid programs and write clean code The C communicates with the M, the C communicates with the V, but the V and the M never communicate with each other directly We must have the following systems of the MVC clearly commented in our application We must have all the code in the same file so we can easily locate it We must have the following responsibilities of the M, V, and C clearly separated in our application | MVC helps the code to be more readable, easier to maintain, more secure, easier to reuse code and allows simultaneous work between developers who are responsible for different MVC components We must have all code for each function in separate files so we can have a complicated website Show transcribed image text Question 30 3 pts You have an existing associative array, $students, and want to remove the ‘grade’ key/value pair from it. What is the correct PHP statement to do this? Note: I do not want the grade element set to blank or null. I want the grade element removed from the array. $students[‘grade’] = null; unset($students->grade) $students->unset(‘password’) $students->grade = null; None of the answers are correct $students->unset(‘grade’) unset($students[‘grade’]) unset($students[‘password’]) $students->grade->delete()
Question 33 3 pts What CSS property is used to changed an inline element into a block element? O inline => block; O display: inline-block; O None of the answers are correct o display: inline; O mode: block; o convert: block; o display: block;
Question 42 3 pts Which function, commonly used in PHP, escapes special characters for a SQL statement which helps web developers defend against hackers using SQL injections? Note: Used the one shown in class. mysqli_escape_string($userInput) shal($userInput) strcmp($userInput) prevent_hackers($userInput) new mysqli($userInput) escape_injections($userInput) O None of the answers are correct $mysqli->real_escape_string($userInput)
Question 44 3 pts What is the main idea behind a MVC architectural pattern? Note: Select all that apply. We must have a good life style in order to make solid programs and write clean code The C communicates with the M, the C communicates with the V, but the V and the M never communicate with each other directly We must have the following systems of the MVC clearly commented in our application We must have all the code in the same file so we can easily locate it We must have the following responsibilities of the M, V, and C clearly separated in our application | MVC helps the code to be more readable, easier to maintain, more secure, easier to reuse code and allows simultaneous work between developers who are responsible for different MVC components We must have all code for each function in separate files so we can have a complicated website
Expert Answer
Answer to Question 30 3 pts You have an existing associative array, $students, and want to remove the ‘grade’ key/value pair from …