PHP Basic Programs for Beginners
PHP Basic Programs for Beginners - Important Points
26. | What is the output of the following PHP code snippet? <?php |
---|
A. Hello
B. world!
C. Hello, w
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
27. | Which of the following is the correct way to add an element to the end of an array in PHP? |
---|
A. array_push($myArray, "newElement");
B. $myArray[count($myArray)] = "newElement";
C. $myArray[] = "newElement";
D. All of the above
View Answer Discuss Work SpaceAnswer: option d
Explanation:
28. | What is the output of the following PHP code snippet? <?php |
---|
A. 5
B. 2
C. 7
D. None of the above
View Answer Discuss Work SpaceAnswer: option c
Explanation:
29. | Which of the following is the correct way to remove an element from the beginning of an array in PHP? |
---|
A. array_shift($myArray);
B. array_pop($myArray);
C. unset($myArray[0]);
D. All of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation: