"> What will be the output of the following PHP code?<?php$Message

Home » PHP » PHP Strings » Question
  1. What will be the output of the following PHP code?
    <?php
    $Message = "this is important message...";
    echo ucwords($Message);
    ?>
    1. Error
    2. This Is Important Message...
    3. Nothing
    4. this is important message...
    5. None of these
Correct Option: B

The ucwords() function capitalizes the first letter of each word in a string. Its prototype follows: string ucwords(string str).



Your comments will be displayed only after manual approval.