How can mod_rewrite be used to create user-specific URLs in PHP?

To create user-specific URLs in PHP using mod_rewrite, you can rewrite the URLs to include a user identifier as a parameter. This allows you to dynamically generate user-specific content based on the user identifier in the URL.

```php
RewriteEngine On
RewriteRule ^user/([0-9]+)$ user.php?id=$1 [L]
```

In this code snippet, any URL that matches the pattern "user/[user_id]" will be rewritten to "user.php?id=[user_id]". This allows you to access the user identifier in your PHP code using the $_GET['id'] variable and display user-specific content accordingly.