How to pop an alert message box using php?

The alert message just like a popup window on the screen. Using this you can alert to the user with some information and message.

1. Code:

<?php
// PHP program to pop an alert message box on the screen
function function_alert($message) { 
    // Display the alert box 
    echo "<script>alert('$message');</script>";
}
// Function call
function_alert("Welcome to Soltuts.com");
  
?>

2. Example:

Input:

Message: "Welcome to Soltuts.com"

Output:

Run the PHP program to pop up an alert box on the screen with the above message.