How can PHP developers ensure that each person has a unique booking with the same ID in a multiple selection scenario?

In a multiple selection scenario where each person can make a booking with the same ID, PHP developers can ensure uniqueness by generating a unique identifier for each booking. This can be achieved by combining the booking ID with a timestamp or a random string to create a unique key for each booking.

// Generate a unique booking ID by combining the booking ID with a timestamp
$bookingId = $bookingId . '_' . time();

// Alternatively, generate a unique booking ID using a random string
$bookingId = $bookingId . '_' . uniqid();