0
When we try to add string with integer or integer with string..what will be the answer.
when we try to add string with integer or integer with string with the help of + sign PHP automatically convert the string into appropriate integer and show the result in favour of integer becoz of + sign..if we use "." sign instead of + sign to add two different data types values the result will be in string favour.
1 Odpowiedź
+ 1
refer link it can be do by type casting
https://softwareengineering.stackexchange.com/questions/24378/type-casting-variables-in-php-what-is-the-practical-reason-for-doing-this