Home

What is the correct answer?

4

What will be the output of the following PHP code ?
 <?php  $color1 = red;
$color2 = green;
echo $color1 . $color2;
?>

A. red

B. green

C. red green

D. redgreen

Correct Answer :

D. redgreen


The . operator is used to join to strings.

Related Questions

What will be the output of the following PHP code ? <?php define('GOOD_OCTAL',… To create an object and set the date to JUNE 22, 2013, which one of the… What will be the output of the following PHP code ? <?php $i = 0;while… Which of the following must be installed on your computer so as to run… Which of the following is/are a PHP code editor?i) Notepadii) Notepad++iii)… What will be the output of the following PHP code ? <?php $i = 0;while… What will be the output of the following PHP code ? <?php $color1 =… What will be the output of the following PHP code? If say date is 22/06/2013.… What will be the output of the following PHP code ? <?php $i = 5;while… What will be the output of the following PHP code ? <?php $i = 0;while… What will be the output of the following PHP code? <?php echo (checkdate(4,31,2010)… Which of following variables can be assigned a value to it?i) $3helloii)… What does PHP stand for?i) Personal Home Pageii) Hypertext Preprocessoriii)… What will be the output of the following PHP code ? <?php class Constants{… What is the default time(in seconds) for which session data is considered… What will be the output of the following PHP code? <?php $a1 = array(red,… What will be the output of the following PHP code ? <?php define('GREETING_TEST',… What will be the output of the following PHP code ? <?php $color1 =… What will be the output of the following PHP code ? <?php define(NEW_GOOD_NAME_CONSTANT,… What will be the output of the following code? If say date is 22/06/2013.… What will be the output of the following PHP code ? <?php $color1 =… What will be the output of the following PHP code ? <?php /*echo Hello… What will be the output of the following PHP code? <?php $cars = array(Volvo,… Which one of the following format parameter can be used to identify timezone? What will be the output of the following PHP code ? <?php $i = 5;while… What will be the output of the following PHP code? <?php $a1 = array(a=>red,… What will be the output of the following PHP code ? <?php $color1 =… Which function displays the web pages most recent modification date? What will be the output of the following PHP code ? <?php define(GREETING,… Which one of the following function is useful for producing a timestamp…