0

Why the Code doesn't change the type?

I want to change a string into a float or null. https://code.sololearn.com/wfKlHjs8H6Xz/?ref=app

24th Apr 2018, 4:11 PM
Stefanoo
Stefanoo - avatar
3 Answers
+ 1
you never changed $text in validateFloat you should change last line to $text= floatval($text);
24th Apr 2018, 4:32 PM
đŸ‡źđŸ‡· M N
+ 1
thx your right one mistake fixed :D but unset doesn't work $text = null; also doesn't work
24th Apr 2018, 4:47 PM
Stefanoo
Stefanoo - avatar
+ 1
ah ok i have fixed the problem $text = NULL; unset doesnt work in this scope
24th Apr 2018, 4:54 PM
Stefanoo
Stefanoo - avatar