Which of the following PHP statements will output Hello World on the screen?
1. echo (“Hello World”);
2. print (“Hello World”);
3. printf (“Hello World”);
4. sprintf (“Hello World”);
A. 1 and 2
B. 1, 2 and 3
C. All of the mentioned
D. 1, 2 and 4
Answer: Option B
Solution(By Examveda Team)
echo(), print() and printf() all three can be used to output a statement onto the screen. The sprintf() statement is functionally identical to printf() except that the output is assigned to a string rather than rendered to the browser.Related Questions on Basic PHP
A. Both 1 and 3
B. Both 2 and 4
C. Only 2
D. Both 1 and 2
Which of the following is/are a PHP code editor?
1. Notepad
2. Notepad++
3. Adobe Dreamweaver
4. PDT
A. Only 4
B. All of the mentioned
C. 1, 2 and 3
D. Only 3
A. All of the mentioned.
B. Only 2
C. 2 and 3
D. 2, 3 and 4
Join The Discussion