PHP Code:
<?php
$name= 'crazyfrog';
$action = ' is coming to town.';
$n1 = 8;
$n2=9;
echo $name.$action;
echo '<br>';
echo '8 + 9 = ' . ($n1+$n2);
echo '<br>' . (8*9);
1 doubt
does php use any preference rules from maths?
like BODMAS (Bracket, of, division, multiplication, addition, subtraction) rule or something?
when echoed does the compiler compiles the things in bracket first?
i had an error when i omitted the bracket of 8*9
PHP Code:
echo '<br>'.(8*9);
had error with this code.
PHP Code:
echo '<br>'.8*9;
Bookmarks