How can named parameters be used in a PDO insert statement in PHP?

When using named parameters in a PDO insert statement in PHP, you need to bind each parameter with its corresponding value using the `bindParam` method. This allows you to specify the parameter name in the SQL query and then bind its value separately, which can improve readability and maintainability of the code.

// Sample PDO insert statement using named parameters
$sql = "INSERT INTO table_name (column1, column2) VALUES (:param1, :param2)";
$stmt = $pdo->prepare($sql);

// Bind values to named parameters
$stmt->bindParam(':param1', $value1);
$stmt->bindParam(':param2', $value2);

// Execute the statement
$stmt->execute();