Examveda
Examveda

What will be the output of the following PHP code ?
<?php
echo "This", "was", "a", "bad", "idea";
?>

A. This, was, a, bad, idea

B. This was a bad idea

C. Thiswasabadidea

D. Error

Answer: Option C

Solution(By Examveda Team)

In an echo statement the comma operator is used to join strings.

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

Join The Discussion

Related Questions on Operators and Expressions in php