How can PHP echo statements be used to generate dynamic URLs with user IDs as variables?

When generating dynamic URLs with user IDs as variables in PHP, you can use the `echo` statement to concatenate the user ID within the URL string. This allows you to create unique URLs for each user based on their ID. By using concatenation, you can easily insert the user ID into the URL template.

<?php
$user_id = 123; // Example user ID
echo "https://example.com/user_profile.php?id=" . $user_id;
?>