That happens when we concatenate numbers in PHP
<?php
echo 10 . 3; // outputs 103, here 10 & 3 converted into strings
echo 'Ten' . 3; // outputs Ten3, here 3 converted into string
echo 10 . 'Three'; // outputs 10Three, here 10 converted into string
// Concatenation Operator (.) is used to add two strings, not float or integer.
?>
echo 10 . 3; // outputs 103, here 10 & 3 converted into strings
echo 'Ten' . 3; // outputs Ten3, here 3 converted into string
echo 10 . 'Three'; // outputs 10Three, here 10 converted into string
// Concatenation Operator (.) is used to add two strings, not float or integer.
?>
Comments
Post a Comment