Question #28
How to convert a string into integer in PHP?
Merged questions
Answer
In PHP, the function intval()
get the integer value of a variable:
echo intval(39); // 39
echo intval(3.9); //3
echo intval('28'); //28
echo intval('t'); //0
3 events in history
Answer by Alphonsio 05/18/2020 at 03:05:56 PM
In PHP, the function intval()
get the integer value of a variable:
echo intval(39); // 39
echo intval(3.9); //3
echo intval('28'); //28
echo intval('t'); //0
Answer by Alphonsio 05/03/2020 at 01:11:22 PM
The function intval()
get the integer value of a variable:
echo intval(39); // 39
echo intval(3.9); //3
echo intval('28'); //28
echo intval('t'); //0
Question by Alphonsio 05/03/2020 at 01:08:01 PM
How to convert a string into integer in PHP?
# | ID | Query | URL | Count |
---|
Icons proudly provided by Friconix.