Problem Statement
How can you convert a string to an integer in PHP?
Explanation
You can cast a string to an integer using (int) or the intval() function. Example: intval('25') returns 25. Type casting helps in performing numeric operations safely.
Code Solution
SolutionRead Only
$num = (int)'25';
