Register|Login

Have a question? Click here to ask the community.

Quiz 6 – Strings

| In: PHP Quizzes | 34,796 views

*You are currently not logged in and your quiz score will not be recorded. Please login or register if you would like to submit your quiz score.

Directions: Answer all questions. Any questions skipped will be scored as wrong answers. Good Luck! :)

1. A string can be stored in a variable?

True
False

2. You can create a string using single quotes?

True
False

3. What happens if you escape a character in a string that does not need to be?

Nothing happens
A backslash will show up when outputting the string
A forward slash will show up when outputting the string
All of the above

4. Heredoc allows you to create multi-line strings without using quotations?

True
False

5. Double quotes allow you to use many special escaped characters that you cannot do with single quotes?

True
False

6. From the following php scripting block, what will be displayed in the browser:

<?php
$aVariable = “Robert\’s”;
echo $aVariable;
?>

Robert’s
aVariable
Robert\’s
None of the above

7. What 3 characters must you type to begin a heredoc?

$$$
>>>
<<<
^^^

Comment Form

You must be logged in to post a comment.

Users Online

Users Online: 5 Users

Most Users Ever Online: 91

Quiz Scores

Advertisments