How can you assign a timestamp to a variable in PHP?

To assign a timestamp to a variable in PHP, you can use the `time()` function which returns the current Unix timestamp. This timestamp represents the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). By assigning the result of the `time()` function to a variable, you can easily work with timestamps in your PHP code.

$timestamp = time();
echo $timestamp;