"/>
Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. What will be the output of the following PHP code ?

    <?php

    define("GREETING", "PHP is a scripting language");

    echo $GREETING;

    ?>

  2. A.

     $GREETING

    B.

     no output

    C.

     PHP is a scripting language

    D.

     GREETING

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Constants do not need a $ before them, they are referenced by their variable names itself.


Be The First To Comment