Convert a String to a Number in PHP code example
Example 1: Convert a String to a Number in PHP
phpCopysettype($variableName, "typeName");
Example 2: Convert a String to a Number in PHP
phpCopy$variableName = (int)$stringName
$variableName = (float)$stringName
Example 3: Convert a String to a Number in PHP
phpCopyintval( $StringName );