php convert db string to int code example Example 1: php string to int intval($string); Example 2: Convert a String to a Number in PHP phpCopyintval( $StringName );