I have a select list with a number of option tags. For each option tag, I want to display multiple values to the user.
<option value="' . $location['locationId'] . '">' . $location['locationName'] . '</option>
Instead of only displaying the $location['locationName'], I would like to display values contained to that location, ex: $location['city'], $location['province']
I can't seem to find a way to display this in an appealing way.
Here is my select list in complete:
<select class="form-control" size="10" name="locationId">';
foreach ($locations as $location) {
$pageContent[] = '<option value="' . $location['locationId'] . '">' . $location['locationName'] . '</option>';
}
$pageContent[] = '</select>