How can a random number with specified limits be generated in PHP?

To generate a random number with specified limits in PHP, you can use the `rand()` function which generates a random integer within a specified range. You can specify the minimum and maximum values for the random number by passing them as arguments to the `rand()` function.

$min = 1;
$max = 100;
$randomNumber = rand($min, $max);
echo $randomNumber;