Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$on$e = 1;
$tw$o = 2;
$thre$e = 3;
$fou$r = 4;
echo "$on$e / $tw$o + $thre$e / $fou$r"; 
?>

A. 0.75

B. 0.05

C. 1.25

D. Error

Answer: Option D

Solution(By Examveda Team)

You can not use the $ in between the variable name.

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

Join The Discussion

Related Questions on Operators and Expressions in php