What will be the output of the following PHP code (11)?

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

<?php 
$str = addslashes('Hello "Includehelp!"');
echo($str); 
?>
  1. Hello Includehelp!
  2. Hello "Includehelp!"
  3. Hello ""Includehelp!""
  4. Hello \"Includehelp!\"

Answer: D) Hello \"Includehelp!\"

Explanation:

The addslashes() function is used to get a string with backslashes in front of predefined characters.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.