String is mean that group of sentences but it is used as integer value is it correct? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

String is mean that group of sentences but it is used as integer value is it correct?

>?php $str = "10"; $int = 20; $sum = $str + $int; echo ($sum);

18th Mar 2019, 1:33 PM
Kamalahasan B
1 Answer
0
Using var_dump($sum) we see that php convert for integer. If your code receive values of a html form its string. Then you needs convert for work with its. I think this for while. I think that string is best define as set or group of characters. I hope be helpful. Sorry my english. Below my code of study this question: https://code.sololearn.com/w6fxLJpsEE0q/?ref=app
18th Mar 2019, 11:25 PM
Walberto