Examveda
Examveda

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

Answer: Option D

Solution(By Examveda Team)

The . operator is used to join to strings.

This Question Belongs to PHP >> Operators And Expressions In Php

Join The Discussion

Related Questions on Operators and Expressions in php