Home / CSE MCQs / PHP MCQs :: Discussion

Discussion :: PHP MCQs

  1. Which of the following PHP statements will output Hello World on the screen?
    (i) echo ("Hello World);
    (ii) print ("Hello World);
    (iii) printf ("Hello World);
    (iv) sprintf ("Hello World);
  2. A.
    (i) and (ii)
    B.
    (i), (ii) and (iii)
    C.
    All of the mentioned
    D.
    (i), (ii) and (iv)

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    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.


Be The First To Comment