In PHP, what methods can be used to convert a string representation of a numeric value to a numerical data type for database insertion?

When inserting numeric values into a database in PHP, it's important to ensure that the data type matches the database column type. If you have a string representation of a numeric value that needs to be inserted into a database, you can use the `intval()` or `floatval()` functions to convert the string to an integer or float data type, respectively. These functions will parse the string and return the appropriate numerical data type for database insertion.

// Example of converting a string representation of a numeric value to an integer for database insertion
$stringValue = "123";
$intValue = intval($stringValue);

// Example of converting a string representation of a numeric value to a float for database insertion
$stringValue = "123.45";
$floatValue = floatval($stringValue);