Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (4)?
30. What will be the output of the following PHP code?
<?php
$a = 5;
$b = 10;
print ("$a, $b+10");
?>
- 5, 10+10
- 5, 20
- 5 10+10
- 5 20
Answer: A) 5, 10+10
Explanation:
In the above PHP script, the print statement prints the values of the variables and text as it as. Thus, in the statement "$a, $b+10", "+10" will be printed as it as.