Register|Login

Have a question? Click here to ask the community.

Quiz 5 – Echo

| In: PHP Quizzes | 35,031 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. The echo command is a means of outputting text to the web browser?

True
False

2. You can use HTML tags within an echo string?

True
False

3. If your echo string contains quotations, which tactic or tactics should you use?

Simply do not use quotes inside your string
Escape your quotes that are within the string with a backslash, i.e. \”
Use single quotes for quotes inside your string
All of the above

4. Quotations are required when echoing variables?

True
False

5. Which of the following is the incorrect way to echo a variable?

echo “$aVariable”;
echo $aVariable;
None of the above

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

<?php
$aVariable = “Hello Robert”;
echo “$aVariable”;
?>

Hello
aVariable
Hello Robert
None of the above

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

<?php
echo “<b>Hello Robert</b>”;
?>

Hello Robert
Hello Robert

Comment Form

You must be logged in to post a comment.

Users Online

Users Online: 4 Users

Most Users Ever Online: 91

Quiz Scores

    Recent Quiz Attempts

Advertisments