PHP Basic Programs for Beginners
PHP Basic Programs for Beginners - Important Points
| 6. | Which of the following is the correct way to include a PHP file in another PHP file? |
|---|
A. include("myfile.php");
B. require("myfile.php");
C. include_once("myfile.php");
D. All of the above
View Answer Discuss Work SpaceAnswer: option d
Explanation:
| 7. | What is the output of the following code snippet? <?php |
|---|
A. 1 2 3 4 5
B. 1 2 3 4
C. 1 2 3
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
| 8. | Which of the following is the correct way to define a constant in PHP? |
|---|
A. define("MY_CONST", "Hello");
B. const MY_CONST = "Hello";
C. MY_CONST = "Hello";
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
| 9. | What is the output of the following PHP code snippet? <?php |
|---|
A. Even
B. Odd
C. 7
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
| 10. | What is the output of the following PHP code snippet? <?php |
|---|
A. 5
B. 6
C. 5
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation: