PHP Basic Programs for Beginners
PHP Basic Programs for Beginners - Important Points
16. | What is the output of the following PHP code snippet? <?php |
---|
A. The result is 10
B. The result is 5
C. The result is 15
D. None of the above
View Answer Discuss Work SpaceAnswer: option c
Explanation:
17. | Which of the following is the correct way to check if a variable is not null in PHP? |
---|
A. if ($myVar == null) { ... }
B. if ($myVar === null) { ... }
C. if ($myVar != null) { ... }
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
18. | What is the output of the following PHP code snippet? <?php |
---|
A. Hi, world!
B. Hello, world!
C. Hi
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
19. | Which of the following is the correct way to sort an array in ascending order in PHP? |
---|
A. sort($myArray, "ASC");
B. asort($myArray);
C. ksort($myArray);
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
20. | What is the output of the following PHP code snippet? <?php |
---|
A. 12345
B. 54321
C. 1234
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation: