👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.
How to convert a string into integer in PHP?
In PHP, the function intval()
get the integer value of a variable:
echo intval(39);
echo intval(3.9);
echo intval('28');
echo intval('t');