Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. What will be the output of the following PHP code if date is 24/02/2008?

    <?php

    $date = new DateTime();

    echo $date->format('l,F,js,Y')

    ?>

  2. A.

     Sunday, February 24th 2008

    B.

     Sunday, 02 24 2008

    C.

     Sunday, 24 02 2008

    D.

     Sunday, 24th February 2008

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The format() method displays the date in same way as standard date function().


Be The First To Comment