"> What will be the output of the following PHP code?<?phpecho

Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code?
    <?php
    echo ord ("Rahul");
    ?>
    1. 81
    2. 82
    3. 83
    4. 84
    5. 85
Correct Option: B

The ord() function returns the ASCII value of the first character of a string. The ASCII value of R is 82, thus 82 was displayed.



Your comments will be displayed only after manual approval.