+ 2
I understand..What is just happening in this code.....but will anyone would explain me is it good or bad....?
.see the code <?php $name = '2_Jo_1_hn'; $age = 25; echo $name+$age; ?>
6 Answers
+ 10
This is why I don't like Php :(
It's adding the number portion of name (2) and age.
2+25 = 27
If you remove "2" from name variable, it'll print 25
+ 7
compiler skips the line from _ symbol. this is a tricky exam question.
use <?php
$name = '2_Jo_1_hn';
$age = 25;
echo $name.$age;
?>
+ 5
Well I don't get what you mean if this code is good or bad.. but echo is "bad" to be used to display variables.. because you can display them on html code and customise them with css using for example <p> <?=$name + $age ?> </p>
+ 4
use dot operator for concatenation
+ 2
ok.... thank you for the explanation....brother...
+ 1
yes....i saw that.....too....so many typical things are surrounded with php programming....mšš