+ 2

Hi, Why there is an error in the last row of the code below?

https://code.sololearn.com/w7Dz8krcjg9V/?ref=app

15th Jul 2019, 5:28 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
4 Antworten
+ 2
I put parentheses around the expression ($distance/10) and error is solved. echo "<td align='right'>".($distance/10)."</td>\n</tr>\n"; In php period(.) is for concatenation, I guess. And in last line it is preceded by a number so may be that's why it is considered as decimal and not the concatenation operator. I may be wrong, I don't know php.
15th Jul 2019, 5:52 PM
Nidhi
+ 2
Thank You very very much. You 've solved the problem. I did not SUSPECTED it is the key._-:)
15th Jul 2019, 6:02 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 2
You did not in a mistake. special TANKS, Nidhi!
15th Jul 2019, 6:05 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
0
☺️glad to know it helped.
15th Jul 2019, 6:20 PM
Nidhi