How can you assign multiple values to a single variable in PHP?

In PHP, you can assign multiple values to a single variable by using an array. This allows you to store and access multiple values using a single variable name. To assign multiple values to a variable, simply create an array and assign it to the variable. You can then access individual values in the array using array indexing.

// Assigning multiple values to a single variable using an array
$values = array(10, 20, 30, 40);

// Accessing individual values in the array
echo $values[0]; // Output: 10
echo $values[1]; // Output: 20
echo $values[2]; // Output: 30
echo $values[3]; // Output: 40