What is the correct syntax for using str_replace() in PHP to replace multiple strings?

When using the str_replace() function in PHP to replace multiple strings, you can pass arrays of search and replace values to the function. This allows you to replace multiple occurrences of different strings in a single function call. Simply create arrays of search and replace values and pass them as arguments to the str_replace() function.

// Example of using str_replace() to replace multiple strings
$string = "Hello world! This is a test.";
$search = array("Hello", "world", "test");
$replace = array("Hi", "planet", "example");
$new_string = str_replace($search, $replace, $string);

echo $new_string; // Output: Hi planet! This is a example.