How can mod_rewrite be used to change GET URLs in PHP?

Mod_rewrite can be used to change GET URLs in PHP by rewriting the URL structure in the .htaccess file. This allows for cleaner and more user-friendly URLs to be displayed to users while still directing them to the correct PHP file that processes the GET parameters.

```php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^/]*)$ /index.php?param1=$1&param2=$2 [L]
```

This code snippet in the .htaccess file will rewrite URLs like `example.com/param1/value1/param2/value2` to `example.com/index.php?param1=value1&param2=value2`. This allows for a more readable and user-friendly URL structure while still passing the necessary parameters to the PHP script.