Zend PHP 5.3 Certification Exam


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  • Question 20/31

    Using nl2br() is a handy way to format plain-text for output in a HTML document.

    What is the output of the following PHP script?

    
    <?php
        $str nl2br("foo\nbar");
    
        // nl2br doesn't remove the \n
        $str str_replace("\n"""$str);
    
        echo nl2br($str);
    ?>
    
    
    Enter the exact script output