convert number() php code example
Example 1: php to int
$num = "3.14";
$int = (int)$num;
Example 2: Convert a String to a Number in PHP
phpCopy$variableName = (int)$stringName
$variableName = (float)$stringName
$num = "3.14";
$int = (int)$num;
phpCopy$variableName = (int)$stringName
$variableName = (float)$stringName